CN109068150A - A kind of excellent picture extracting method, terminal and the computer-readable medium of video - Google Patents
A kind of excellent picture extracting method, terminal and the computer-readable medium of video Download PDFInfo
- Publication number
- CN109068150A CN109068150A CN201810893778.8A CN201810893778A CN109068150A CN 109068150 A CN109068150 A CN 109068150A CN 201810893778 A CN201810893778 A CN 201810893778A CN 109068150 A CN109068150 A CN 109068150A
- Authority
- CN
- China
- Prior art keywords
- key frame
- frame picture
- picture
- video
- highlight
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 80
- 238000012545 processing Methods 0.000 claims description 26
- 238000004590 computer program Methods 0.000 claims description 15
- 238000003860 storage Methods 0.000 claims description 13
- 238000005520 cutting process Methods 0.000 claims description 12
- 238000000605 extraction Methods 0.000 claims description 8
- 230000002123 temporal effect Effects 0.000 claims description 7
- 238000010586 diagram Methods 0.000 description 17
- 239000000284 extract Substances 0.000 description 13
- 238000004891 communication Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 6
- 230000004927 fusion Effects 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 230000000007 visual effect Effects 0.000 description 4
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000012015 optical character recognition Methods 0.000 description 3
- 238000011161 development Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/234—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/234—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
- H04N21/23418—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
- H04N21/44008—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics in the video stream
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Image Analysis (AREA)
Abstract
The embodiment of the invention discloses a kind of video highlight picture extracting method, terminal and computer-readable mediums, and wherein method includes: at least one the key frame picture extracted in video according to prefixed time interval;It wherein, include Wonderful time feature in the key frame picture;Wonderful time feature is used to characterize the excellent characteristic of video;Whether the Wonderful time feature in identification key frame picture matches with target signature;If so, determining that key frame picture is the Wonderful time picture node in video.Implement the application, can solve the problem that comparison process existing in the prior art is cumbersome, complicated, the recognition efficiency of terminal can be improved.
Description
Technical Field
The invention relates to the technical field of video processing, in particular to a method for extracting a highlight picture of a video, a terminal and a computer readable medium.
Background
With the rapid development of computer technology, users have various demands on game experiences, among which are more prominent: the user wants to watch the highlight picture existing in the game, for example, pictures such as opponents (such as two-time breaking, three-time breaking, five-time breaking, etc.) which are continuously beaten for multiple times, which means that the highlight picture obtained from the game video needs to be stored on the terminal.
In the prior art, an implementation process for acquiring a highlight picture from a game video may include: obtaining a target picture from a wonderful moment picture in a game video in advance; secondly, obtaining a contrast picture from the position of a current frame in the game video; and then, using a perceptual hash algorithm to obtain hash values of the target picture and the comparison picture. And under the condition that the distance between the hash values of the target picture and the comparison picture is smaller than a preset threshold value, taking the current frame where the comparison file is located as a wonderful moment picture. In practical application, it can be found that the above method needs to compare hash values of all pictures in a game video, and the comparison process is complicated.
Disclosure of Invention
The embodiment of the invention provides a method for extracting a video highlight, which can solve the problems of complex and complicated comparison process in the prior art and can improve the identification efficiency of a terminal.
In a first aspect, an embodiment of the present invention provides a method for extracting a video highlight, where the method includes:
extracting at least one key frame picture in the video according to a preset time interval; wherein the key frame picture comprises wonderful moment characteristics; the wonderful moment feature is used for representing wonderful characteristics of the video;
identifying whether the wonderful moment features in the key frame picture are matched with target features or not;
and if so, determining the key frame picture as a highlight moment picture node in the video.
By implementing the embodiment of the invention, the terminal can extract a plurality of key frame pictures in the video according to the preset time interval, identify whether the wonderful moment feature in the key frame picture is matched with the target feature, and determine the key frame picture as a wonderful moment picture node in the video under the condition of matching, so that the problems of complicated and complicated comparison process in the prior art can be solved, and the identification efficiency of the terminal can be improved.
Optionally, the at least one key frame picture includes a first key frame picture and a second key frame picture;
the key frame pictures carry time information, the time information is used for determining the first key frame picture in the at least one key frame picture, the first key frame picture is a key frame picture corresponding to the front time of the time information in the time information carried by each key frame picture in the at least one key frame picture, and the second key frame picture is adjacent to the first key frame picture;
the identifying whether the highlight features in the key frame picture are matched with the target features comprises: identifying whether the wonderful moment feature in the first key frame picture is matched with a target feature;
the method further comprises the following steps:
if the wonderful moment feature in the first key frame picture is not completely matched with the target feature, checking the first key frame picture according to a preset fault-tolerant mechanism, and marking the first key frame picture meeting a preset fault-tolerant rate as an uncertain node;
if the second key frame picture is a highlight moment picture node, fusing the first key frame picture and the second key frame picture to obtain a highlight moment time region;
and cutting the video according to the time region of the wonderful moment to obtain the wonderful moment video of the video.
Optionally, a third key frame picture is adjacent to the second key frame picture; the third key frame picture is a picture behind the second key frame picture;
if the feature of the highlight moment in the first key frame picture is not completely matched with the target feature, the method further includes the following steps of verifying the first key frame picture according to a preset fault tolerance mechanism, and marking the first key frame picture meeting a preset fault tolerance as an uncertain node:
and if the second key frame picture is not the wonderful moment picture node and the third key frame picture is not the wonderful moment picture node, discarding the first key frame picture.
Optionally, the at least one key frame picture includes a first key frame picture, a second key frame picture and a third key frame picture; the first key frame picture is adjacent to the second key frame picture, and the first key frame picture is also adjacent to the third key frame picture; the second key frame picture is a picture before the first key frame picture, and the third key frame is a picture after the first key frame picture;
the identifying whether the highlight features in the key frame picture are matched with the target features comprises: identifying whether the wonderful moment feature in the first key frame picture is matched with a target feature;
the method further comprises the following steps:
if the wonderful moment feature in the first key frame picture is not completely matched with the target feature, checking the first key frame picture according to a preset fault-tolerant mechanism, and marking the first key frame picture meeting a preset fault-tolerant rate as an uncertain node;
if the second key frame picture is a wonderful moment picture node and the third key frame picture is an uncertain node, discarding the first key frame picture;
or,
and if the second key frame picture is a wonderful moment picture node and the third key frame picture is a wonderful moment picture node, fusing the first key frame picture, the second key frame picture and the third key frame picture to obtain a wonderful moment time region.
Optionally, after extracting at least one key frame picture in the video according to a preset time interval, the method further includes:
and cutting the key frame picture, and carrying out image binarization processing on the cut key frame picture.
Optionally, the at least one key frame picture includes a first key frame picture and a second key frame picture;
the key frame pictures carry time information, the time information is used for determining the first key frame picture in the at least one key frame picture, the first key frame picture is a key frame picture corresponding to the front time of the time information in the time information carried by each key frame picture in the at least one key frame picture, and the second key frame picture is adjacent to the first key frame picture;
after determining that the key frame picture is a highlight picture node in the video, the method further includes:
if the second key frame picture is a highlight moment picture node, the first key frame picture is a picture in a highlight moment video;
and if the second key frame picture is not the highlight moment picture node, discarding the first key frame picture.
Optionally, before extracting at least one key frame picture in the video according to the preset time interval, the method further includes:
determining a plurality of key frame pictures containing the wonderful moment features in the video and acquiring the time positions of the key frame pictures in the video; the temporal positions of the plurality of key frame pictures in the video are used to determine the preset time interval.
In a second aspect, an embodiment of the present invention provides a terminal, where the terminal includes:
the device comprises an extraction unit, a processing unit and a display unit, wherein the extraction unit is used for extracting at least one key frame picture in a video according to a preset time interval; wherein the key frame picture comprises wonderful moment characteristics; the wonderful moment feature is used for representing wonderful characteristics of the video;
the identification unit is used for identifying whether the wonderful moment feature in the key frame picture is matched with the target feature;
and the determining unit is used for determining the key frame picture as a highlight moment picture node in the video under the condition that the distinguishing unit identifies that the highlight moment feature in the key frame picture is matched with the target feature.
Optionally, the at least one key frame picture includes a first key frame picture and a second key frame picture;
the key frame pictures carry time information, the time information is used for determining the first key frame picture in the at least one key frame picture, the first key frame picture is a key frame picture corresponding to the front time of the time information in the time information carried by each key frame picture in the at least one key frame picture, and the second key frame picture is adjacent to the first key frame picture;
the identification unit is specifically used for identifying whether the feature of the highlight moment in the first key frame picture is matched with the target feature;
the terminal further comprises:
the verification unit is used for verifying the first key frame picture according to a preset fault-tolerant mechanism under the condition that the identification unit identifies that the wonderful moment feature in the first key frame picture is not completely matched with the target feature;
the marking unit is used for marking the first key frame picture meeting the preset fault tolerance as an uncertain node after the checking unit checks the first key frame picture according to a preset fault tolerance mechanism;
a fusion unit; the determining unit is used for fusing the first key frame picture and the second key frame picture under the condition that the second key frame picture is determined to be a highlight moment picture node by the determining unit so as to obtain a highlight moment time region;
and the first clipping unit is used for clipping the video according to the time region of the highlight moment so as to obtain the highlight moment video of the video.
Optionally, a third key frame picture is adjacent to the second key frame picture; the third key frame picture is a picture behind the second key frame picture; the terminal further comprises a first discarding unit;
the first discarding unit is configured to discard the first key frame picture when the second key frame picture is not a highlight moment picture node and the third key frame picture is not a highlight moment picture node after the marking unit marks the first key frame picture meeting a preset fault tolerance as an uncertain node.
Optionally, the at least one key frame picture includes a first key frame picture, a second key frame picture and a third key frame picture; the first key frame picture is adjacent to the second key frame picture, and the first key frame picture is also adjacent to the third key frame picture; the second key frame picture is a picture before the first key frame picture, and the third key frame is a picture after the first key frame picture;
the identification unit is specifically used for identifying whether the feature of the highlight moment in the first key frame picture is matched with the target feature;
the terminal further comprises a second discarding unit;
the second discarding unit is configured to discard the first key frame picture when the second key frame picture is a highlight moment picture node and the third key frame picture is an uncertain node after the marking unit marks the first key frame picture meeting a preset fault tolerance as the uncertain node;
or, the fusion unit is further configured to fuse the first key frame picture, the second key frame picture and the third key frame picture to obtain a time region of the highlight moment when the second key frame picture is a highlight moment picture node and the third key frame picture is a highlight moment picture node.
Optionally, the terminal further includes a second clipping unit and a binarization processing unit;
the second cutting unit is used for cutting the key frame picture after the extracting unit extracts at least one key frame picture in the video according to a preset time interval;
and the binarization processing unit is used for carrying out image binarization processing on the cut key frame picture.
Optionally, the at least one key frame picture includes a first key frame picture and a second key frame picture;
the key frame pictures carry time information, the time information is used for determining the first key frame picture in the at least one key frame picture, the first key frame picture is a key frame picture corresponding to the front time of the time information in the time information carried by each key frame picture in the at least one key frame picture, and the second key frame picture is adjacent to the first key frame picture;
the terminal also comprises a processing unit and a third discarding unit;
the processing unit is used for determining that the first key frame picture is the picture in the highlight moment video under the condition that the second key frame picture is the highlight moment picture node after the key frame picture is determined to be the highlight moment picture node in the video by the determining unit;
the third discarding unit is configured to discard the first key frame picture if the second key frame picture is not a highlight moment picture node.
Optionally, the terminal further includes a key frame picture determining unit and an obtaining unit;
the key frame picture determining unit is used for determining a plurality of key frame pictures containing the wonderful moment characteristics in the video before the extracting unit extracts at least one key frame picture in the video according to a preset time interval;
the acquisition unit is used for acquiring the time positions of the plurality of key frame pictures in the video; the temporal positions of the plurality of key frame pictures in the video are used to determine the preset time interval.
In a third aspect, an embodiment of the present invention provides another terminal, which includes a processor, an input device, an output device, and a memory, where the processor, the input device, the output device, and the memory are connected to each other, where the memory is used to store a computer program that supports the terminal to execute the foregoing method, and the computer program includes program instructions, and the processor is configured to call the program instructions to execute the foregoing method according to the first aspect.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, in which a computer program is stored, the computer program comprising program instructions, which, when executed by a processor, cause the processor to perform the method of the first aspect.
In a fifth aspect, an embodiment of the present invention provides a computer program, which includes program instructions, which, when executed by a processor, cause the processor to perform the method of the first aspect.
By implementing the embodiment of the invention, the terminal can extract a plurality of key frame pictures in the video according to the preset time interval, identify whether the wonderful moment feature in the key frame pictures is matched with the target feature, and determine the key frame pictures as wonderful moment picture nodes in the video under the condition of matching, so that the problems of complicated and complicated comparison process in the prior art can be solved, and the identification efficiency of the terminal can be improved. In the process of acquiring the video at the wonderful moment, the integrity of the video at the wonderful moment can be ensured, the phenomenon that the picture at the wonderful moment flashes in the video at the wonderful moment can be avoided, and the visual effect of a user can be improved.
Drawings
In order to more clearly illustrate the technical solution of the embodiment of the present invention, the drawings used in the description of the embodiment will be briefly introduced below.
Fig. 1 is a schematic flow chart of a video highlight extracting method according to an embodiment of the present invention;
FIG. 2A is a schematic flow chart of a method for extracting highlight from video according to another embodiment of the present invention;
FIG. 2B is a schematic diagram of a temporal position relationship between a first key frame picture and a second key frame picture according to an embodiment of the present invention;
FIG. 3A is a schematic flow chart of a method for extracting highlight from video according to another embodiment of the present invention;
FIG. 3B is a schematic diagram of a time position relationship between a first key frame picture and a second key frame picture as well as a third key frame picture according to an embodiment of the present invention;
FIG. 4A is a schematic flow chart of a method for extracting highlight from video according to another embodiment of the present invention;
FIG. 4B is a schematic diagram of a temporal position relationship between a first key frame picture and a second key frame picture as well as a third key frame picture according to another embodiment of the present invention;
FIG. 5 is a schematic flow chart of a video highlight extraction method according to another embodiment of the present invention;
FIG. 6 is a schematic flow chart of a video highlight extraction method according to another embodiment of the present invention;
fig. 7 is a schematic block diagram of a terminal according to an embodiment of the present invention;
fig. 8 is a schematic block diagram of a terminal according to another embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
With reference to the flow diagram of the method for extracting a highlight picture from a video according to the embodiment of the present invention shown in fig. 1, how to extract a highlight picture included in a video according to the embodiment of the present invention is specifically described below, which may include, but is not limited to, the following steps S101 to S103:
step S101, extracting at least one key frame picture in a video according to a preset time interval; wherein, the key frame picture comprises wonderful moment characteristics; the highlight features are used to characterize the highlight features of the video.
In specific implementation, the terminal can analyze whether the video has wonderful moment characteristics in advance; if the highlight feature exists, then the time position of the highlight feature in the video can be determined.
In a specific implementation, the terminal may determine time positions of the plurality of highlight features in the video respectively, and then may set a preset time interval for the terminal to extract the key frame picture in the video according to the plurality of time positions after analyzing the plurality of time positions, for example, the time interval for the terminal to extract the key frame picture in the video may be 1 second or 3 seconds, and the like. It can be understood that, in the embodiment of the present invention, the terminal may filter the entire video to obtain a plurality of key frame pictures including the feature of the highlight moment, so that the processing efficiency of the terminal may be improved.
In a specific implementation, taking the highlight feature "five connecting winning" as an example, the plurality of key frame pictures extracted by the terminal and containing the highlight feature may include: the key frame picture of the wonderful moment characteristic 'five', the key frame picture of the wonderful moment characteristic 'five continuous win', and the key frame picture of the wonderful moment characteristic 'five continuous win'.
In a specific implementation, the video may include a game video, a live video, and the like, and the embodiment of the present invention is not limited in particular. In a specific implementation, if the video is a game video, the frame rate of the game video in the playing process is 25 frames/s, that is, within one second, a display screen of the terminal can display 25 frames of pictures.
In a specific implementation, the highlight feature is used to represent a highlight characteristic of the video, and the highlight feature included in the video may include: without any intention, the four-link extraordinary, the two-link destroyed, the three-link determined and the five-link won, etc., and the present invention is not limited specifically. It is understood that in practical applications, due to the different types of videos, the feature of the highlight contained in the video is different.
In a specific implementation, before extracting the key frame picture in the video according to the preset time interval, the method further includes:
determining a plurality of key frame pictures containing the wonderful moment features in the video and acquiring the time positions of the key frame pictures in the video; the temporal positions of the plurality of key frame pictures in the video are used to determine the preset time interval.
Step S102, identifying whether the wonderful moment feature in the key frame picture is matched with a target feature; if yes, go to step S103.
In a specific implementation, the terminal may obtain one or more target features from a highlight picture in the video in advance. The target feature may be a highlight text. For example, the target feature is "five-junctional win". In a specific implementation, the target feature may also be a highlight killing picture, a highlight winning picture, or the like, and the embodiment of the present invention is not limited in particular.
In a specific implementation, the terminal may use an Optical Character Recognition (OCR) method to recognize whether the feature at the highlight moment in the first key frame picture matches the target feature.
In a specific implementation, the terminal may call a Development interface recognition function of a Software Development Kit (SDK) of the OCR, input at least one key frame picture extracted by the terminal into the recognition function, and then recognize the at least one key frame picture to recognize whether a feature at a highlight moment in the key frame picture matches a target feature, that is, the terminal may obtain a recognition result of the at least one key frame picture.
In specific implementation, the terminal can identify whether the feature at the highlight moment in the first key frame picture is matched with the target feature through a perceptual hash algorithm. For example, the terminal respectively acquires a hash value of the highlight characteristic and a hash value of the target characteristic in the first key frame picture, and when the distance between the highlight hash value and the hash value of the target characteristic in the first key frame picture is smaller than a preset threshold, the terminal identifies that the highlight characteristic in the first key frame picture is matched with the target characteristic.
In a specific implementation, the identifying whether the feature at the highlight moment in the first key frame picture is consistent with the target feature according to a preset rule may include:
and cutting the first key frame picture, and carrying out image binarization processing on the cut first key frame picture.
In a specific implementation, the first key frame picture may be obtained after performing a cropping operation on the terminal. For example, the first key frame picture may only include a picture where the highlight feature is located, and does not include a background picture, a lighting picture, and the like. It can be understood that, in the embodiment of the present invention, the terminal does not need to analyze the whole key frame picture, so that the influence of the background on the identification of the highlight picture is reduced, and the identification precision of the terminal on the highlight picture can be improved.
In a specific implementation, the target feature may be "five connecting winning" of a red color, and the key frame picture includes a highlight feature of the red color. The terminal can carry out binarization processing on the cut key frame picture so as to highlight the wonderful moment characteristics in the key frame picture, thereby reducing the influence of other color elements on wonderful moment picture identification.
In the specific implementation, after the key frame picture is subjected to binarization processing, the terminal can simultaneously record the pixel point characteristic values of the red-color wonderful moment characteristics in the key frame picture, determine the number of the pixel point characteristic values of the red-color wonderful moment in the key frame picture, screen out the key frame pictures meeting the number of the preset pixel point characteristic values, and improve the efficiency of the terminal in identifying the wonderful moment pictures.
And S103, determining the key frame picture as a wonderful moment picture node in the video.
In a specific implementation, the target feature may be "five connecting winning", the highlight feature in the key frame picture is "five connecting winning", at this time, the terminal recognizes that the highlight feature in the key frame picture matches the target feature, and the terminal determines that the key frame picture is a highlight node in the video.
By implementing the embodiment of the invention, the terminal can extract a plurality of key frame pictures in the video according to the preset time interval, identify whether the wonderful moment feature in the key frame picture is matched with the target feature, and determine the key frame picture as a wonderful moment picture node in the video under the condition of matching, so that the problems of complicated and complicated comparison process in the prior art can be solved, and the identification efficiency of the terminal can be improved.
It should be noted that, in the embodiment of the present invention, the key frame picture may include a continuous multi-frame picture or may include one frame picture, and the embodiment of the present invention is not limited in particular. Then, in the case where the key frame picture is a plurality of consecutive pictures, the key frame picture includes a plurality of key frame sub-pictures. Then, the terminal may perform the video highlight extraction method provided in the above-described embodiment of the present invention on each of the plurality of key frame sprites.
With reference to the flowchart of fig. 2A of the method for extracting a highlight picture from a video according to another embodiment of the present invention, how to extract a highlight picture from a video and how to extract a highlight picture from a video according to an embodiment of the present invention will be described in detail, which may include, but is not limited to, the following steps S201 to S207. In the embodiment of the present invention, at least one key frame picture includes a first key frame picture and a second key frame picture, and in a specific implementation, the time position relationship between the first key frame picture and the second key frame picture can be as shown in fig. 2B, before the first key frame picture, there is no other key frame picture; the second key frame picture follows the first key frame picture. Next, how the present invention is implemented will be specifically described:
step S201, extracting at least one key frame picture in a video according to a preset time interval; wherein, the key frame picture comprises wonderful moment characteristics; the highlight features are used to characterize the highlight features of the video.
Step S202, identifying whether the wonderful moment feature in the key frame picture is matched with a target feature; if yes, go to step S203; if not, go to step S204.
And step S203, determining the key frame picture as a highlight picture node in the video.
Specifically, the steps S201 to S203 may refer to the related descriptions of the steps S101 to S103 in the embodiment of fig. 1, which is not repeated herein.
Step S204, if the wonderful moment feature in the first key frame picture is not completely matched with the target feature, checking the first key frame picture according to a preset fault tolerance mechanism, and marking the first key frame picture meeting the preset fault tolerance as an uncertain node.
In a specific implementation, in the embodiment of the present invention, the preset fault tolerance mechanism refers to a condition that is controlled within a certain range to allow or contain a mistake. In a specific implementation, the preset fault tolerance mechanism may include a preset fault tolerance rate, for example, the preset fault tolerance rate is 5%, and the preset fault tolerance rate may be set according to actual needs, for example, application scenarios are different, and preset fault tolerance rate values are also different.
For example, the highlight feature included in the first key frame picture is "quintessence", and the target feature is "quintessence winning". In this case, the terminal determines that the highlight feature in the first key frame picture is not completely matched with the target feature, and then the terminal may check the first key frame picture according to a preset fault-tolerant mechanism, for example, the terminal determines that the matching degree between the highlight feature "five links" and the target feature "five links win" included in the first key frame picture is 80%, and the terminal marks the first key frame picture as an uncertain node. In this case, whether or not the first key frame picture is a picture in the highlight video needs to be determined in combination with pictures adjacent thereto.
For another example, the highlight feature included in the first key frame picture is "five-connecting-success" and the target feature is "five-connecting-success". In this case, the terminal determines that the highlight feature in the first key frame picture is not completely matched with the target feature, and then the terminal may check the first key frame picture according to a preset fault-tolerant mechanism, for example, the terminal determines that the matching degree between the highlight feature "five links" contained in the first key frame picture and the target feature "five links win" is 90%, and the terminal marks the first key frame picture as an uncertain node. In this case, whether or not the first key frame picture is a picture in the highlight video needs to be determined in combination with pictures adjacent thereto.
In a specific implementation, the key frame pictures carry time information, a first key frame picture in the at least one key frame picture is determined according to the time information, the first key frame picture is a key frame picture corresponding to the key frame picture in which the time information in the time information carried by each key frame picture in the at least one key frame picture is earlier, and a second key frame picture is adjacent to the first key frame picture.
Step S205 determines whether the second key frame is a highlight frame node, and if so, step S206 is executed.
For example, the highlight feature included in the second key frame picture is "five-hit world", and the target feature is "five-hit world". In this case, the terminal determines that the highlight time feature in the second key frame picture matches the target feature, and the terminal determines that the second key frame picture is a highlight time picture node.
And S206, fusing the first key frame picture and the second key frame picture to obtain a time region of a wonderful moment.
In a specific implementation, for example, the highlight feature included in the first key frame picture is "win-win," and the highlight feature included in the second key frame picture is "win-win," where the terminal determines that the time information carried by the first key frame picture is 1 minute 30 seconds, and the time information carried by the second key frame picture is 1 minute 35 seconds. The terminal determines that the first key frame picture is an uncertain node, and meanwhile, the terminal determines that the second key frame picture is a highlight moment picture node, at the moment, the terminal fuses the first key frame picture and the second key frame picture, and the time region of the highlight moment is between 1 minute 30 seconds and 1 minute 35 seconds.
And step S207, cutting the video according to the time region of the highlight moment to obtain the highlight moment video of the video.
As mentioned above, the time zone of the terminal for obtaining the highlight is between 1 minute 30 seconds and 1 minute 35 seconds, and the terminal cuts the video according to the time zone of the highlight, so as to obtain the highlight video of the video. It can be understood that the picture with the "win-win" feature and the picture with the "win-win" feature are included in the highlight video, so that the integrity of the highlight video can be ensured.
By implementing the embodiment of the invention, the terminal can extract a plurality of key frame pictures (such as a first key frame picture and a second key frame picture) in the video according to the preset time interval, the terminal determines that the first key frame picture is an uncertain node, the terminal determines that the second key frame picture is a highlight moment picture node, and at the moment, the terminal fuses the first key frame picture and the second key frame picture, so that the video containing highlight moment characteristics in the video can be obtained. In the process of extracting the picture at the wonderful moment, the problems of complex and complicated comparison process in the prior art can be solved, and the identification efficiency of the terminal can be improved. In the process of acquiring the video at the wonderful moment, the integrity of the video at the wonderful moment can be ensured.
With reference to the flowchart of fig. 3A of a method for extracting a highlight picture from a video according to another embodiment of the present invention, how to extract a highlight picture from a video and how to extract a highlight picture from the video according to the embodiment of the present invention will be described in detail below, which may include, but is not limited to, the following steps S301 to S306. In an embodiment of the present invention, the at least one key frame picture includes a first key frame picture, a second key frame picture, and a third key frame picture. In a specific implementation, the time position relationship between the first key frame picture and the second key frame picture and the time position relationship between the first key frame picture and the third key frame picture can be shown in fig. 3B, as shown in fig. 3B, no other key frame picture exists before the first key frame picture; the second key frame picture is subsequent to the first key frame picture, and the third key frame picture is subsequent to the second key frame picture. Next, how the present invention is implemented will be specifically described:
s301, extracting at least one key frame picture in a video according to a preset time interval; wherein, the key frame picture comprises wonderful moment characteristics; the highlight features are used to characterize the highlight features of the video.
Step S302, identifying whether the wonderful moment feature in the key frame picture is matched with a target feature; if yes, go to step S303; if not, go to step S304.
Step S303, determining the key frame picture as a highlight picture node in the video.
Step S304, if the wonderful moment feature in the first key frame picture is not completely matched with the target feature, checking the first key frame picture according to a preset fault tolerance mechanism, and marking the first key frame picture meeting the preset fault tolerance as an uncertain node.
Specifically, the steps S301 to S304 may refer to the related descriptions of the steps S201 to S204 in the embodiment of fig. 2A, which are not repeated herein.
Step S305, determining whether the second key frame picture and the third key frame picture are highlight picture nodes, if yes, executing step S306.
And step S306, discarding the first key frame picture.
In a specific implementation, a third key frame picture is adjacent to the second key frame picture; the third key frame picture is a picture behind the second key frame picture.
As described above, the highlight feature included in the first key frame picture is "five-win", the highlight feature included in the second key frame picture is "five", and the highlight feature included in the third key frame picture is "five". And the terminal determines the first key frame picture as an uncertain node. Meanwhile, the terminal determines that the second key frame picture is not the highlight moment picture node and the third key frame picture is not the highlight moment node, and at the moment, the terminal discards the first key frame picture.
By implementing the embodiment of the invention, the terminal can extract a plurality of key frame pictures (such as a first key frame picture, a second key frame picture and a third key frame picture) in the video according to the preset time interval, the terminal determines that the first key frame picture is an uncertain node, the terminal determines that the second key frame picture and the third key frame picture are not wonderful moment picture nodes, and the terminal discards the first key frame picture at the moment. In the process of extracting the picture at the wonderful moment, the problems of complex and complicated comparison process in the prior art can be solved, and the identification efficiency of the terminal can be improved. In the process of acquiring the video at the wonderful moment, the phenomenon that the picture at the wonderful moment flashes in the video at the wonderful moment can be avoided, and the visual effect of a user can be improved.
With reference to the flowchart of fig. 4A of a method for extracting a highlight from a video according to another embodiment of the present invention, how to extract a highlight from a video and how to extract a highlight video from the video according to the embodiment of the present invention will be described in detail below, which may include, but is not limited to, the following steps S401 to S405. In the embodiment of the present invention, the at least one key frame picture includes a first key frame picture, a second key frame picture and a third key frame picture, and in a specific implementation, the time position relationship among the first key frame picture, the second key frame picture and the third key frame picture can be as shown in fig. 4B, the second key frame picture is before the first key frame picture, and the third key frame picture is after the first key frame picture. Next, how the present invention is implemented will be specifically described:
step S401, extracting at least one key frame picture in a video according to a preset time interval; wherein, the key frame picture comprises wonderful moment characteristics; the highlight features are used to characterize the highlight features of the video.
Step S402, identifying whether the wonderful moment feature in the key frame picture is matched with a target feature; if yes, go to step S403; if not, go to step S404.
And S403, determining the key frame picture as a highlight picture node in the video.
Step S404, if the wonderful moment feature in the first key frame picture is not completely matched with the target feature, checking the first key frame picture according to a preset fault tolerance mechanism, and marking the first key frame picture meeting the preset fault tolerance as an uncertain node.
Specifically, the steps S401 to S404 may refer to the related descriptions of the steps S201 to S204 in the embodiment of fig. 2A, and details are not repeated herein.
Step S405, determining whether the second key frame image is a highlight image node, if yes, executing step S406.
For example, the highlight feature included in the second key frame picture is "five-hit world", and the target feature is "five-hit world". And the terminal determines that the second key frame picture is a wonderful moment picture node.
Step S406, determining whether the third key frame picture is a highlight picture node, and if the third key frame picture is an uncertain node, executing step S407.
In a specific implementation, for example, the highlight feature included in the third key frame picture is "five tie wins", and the terminal determines that the third key frame picture is an uncertain node.
S407, discarding the first key frame picture.
As described above, the terminal determines that the first key frame picture is an uncertain node. Meanwhile, the terminal determines that the second key frame picture is a highlight moment node picture, the terminal determines that the third key frame picture is an uncertain node, and at the moment, the terminal discards the first key frame picture. By implementing the embodiment of the invention, the terminal can extract a plurality of key frame pictures (such as a first key frame picture, a second key frame picture and a third key frame picture) in the video according to a preset time interval, the terminal determines that the first key frame picture is an uncertain node, the terminal determines that the second key frame picture is a highlight moment picture node, and the third key frame picture is an uncertain node. At this point the terminal discards the first key frame picture. In the process of extracting the picture at the wonderful moment, the problems of complex and complicated comparison process in the prior art can be solved, and the identification efficiency of the terminal can be improved. In the process of acquiring the highlight video, uncertain nodes in the highlight video can be avoided, and therefore the highlight degree of the highlight video can be guaranteed.
It should be noted that, in the above embodiment, step S406 may be performed first, and then step S405 is performed, which is not described herein again.
With reference to the flowchart of fig. 5, a method for extracting a highlight picture from a video according to another embodiment of the present invention is described in detail, how to extract a highlight picture from a video and how to extract a highlight picture from the video according to the embodiment of the present invention, which may include, but is not limited to, the following steps S501 to S506. In the embodiment of the present invention, the at least one key frame picture includes a first key frame picture, a second key frame picture and a third key frame picture, and in a specific implementation, the time position relationship among the first key frame picture, the second key frame picture and the third key frame picture can be referred to in fig. 4B, as shown in fig. 4B, the second key frame picture is before the first key frame picture, and the third key frame picture is after the first key frame picture. Next, how the present invention is implemented will be specifically described:
step S501, extracting at least one key frame picture in a video according to a preset time interval; wherein, the key frame picture comprises wonderful moment characteristics; the highlight features are used to characterize the highlight features of the video.
Step S502, identifying whether the wonderful moment feature in the key frame picture is matched with a target feature; if yes, go to step S503; if not, go to step S504.
And S503, determining the key frame picture as a highlight picture node in the video.
Step S504, if the wonderful moment feature in the first key frame picture is not completely matched with the target feature, the first key frame picture is verified according to a preset fault tolerance mechanism, and the first key frame picture meeting the preset fault tolerance rate is marked as an uncertain node.
Specifically, the steps S501 to S504 may refer to the related descriptions of the steps S201 to S204 in the embodiment of fig. 2A, and details are not repeated here.
Step S505, determining whether the second key frame picture and the third key frame picture are highlight picture nodes, if yes, executing step S506.
Step S506, fusing the first key frame picture, the second key frame picture and the third key frame picture to obtain a time region of a highlight moment.
As described above, the terminal determines that the first key frame picture is an uncertain node. Meanwhile, the terminal determines that the second key frame picture and the third key frame picture are wonderful moment picture nodes. At this time, the terminal fuses the first key frame picture, the second key frame picture and the third key frame picture to obtain the time region of the highlight moment under the condition, and then, the video can be cut according to the time region, so that the highlight moment video of the video can be obtained.
By implementing the embodiment of the invention, the terminal can extract a plurality of key frame pictures (such as a first key frame picture, a second key frame picture and a third key frame picture) in the video according to a preset time interval, the terminal determines that the first key frame picture is an uncertain node, the terminal determines that the second key frame picture and the third key frame picture are highlight moment picture nodes, and at the moment, the terminal fuses the first key frame picture, the second key frame picture and the third key frame picture to obtain the video containing highlight moments in the video. In the process of extracting the picture at the wonderful moment, the problems of complex and complicated comparison process in the prior art can be solved, and the identification efficiency of the terminal can be improved. In the process of acquiring the video at the wonderful moment, the integrity of the video at the wonderful moment can be ensured.
With reference to the flowchart of fig. 6, which illustrates a method for extracting a highlight picture from a video according to another embodiment of the present invention, how to extract a highlight picture from a video and how to extract a highlight picture from the video according to the embodiment of the present invention will be described in detail below, which may include, but is not limited to, the following steps S601-S606. In the embodiment of the present invention, at least one key frame picture includes a first key frame picture and a second key frame picture, and in a specific implementation, the position relationship between time of the first key frame picture and the second key frame picture can be as shown in fig. 2B, before the first key frame picture, there is no other key frame picture; the second key frame picture follows the first key frame picture. Next, how the present invention is implemented will be specifically described:
step S601, extracting at least one key frame picture in a video according to a preset time interval; wherein, the key frame picture comprises wonderful moment characteristics; the highlight features are used to characterize the highlight features of the video.
Step S602, identifying whether the wonderful moment feature in the key frame picture is matched with a target feature; if yes, go to step S603.
And step S603, determining the key frame picture as a highlight picture node in the video.
Specifically, in steps S601 to S603, reference may be made to the related descriptions of steps S101 to S103 in the embodiment of fig. 1, which is not repeated herein.
Step S604, determining whether the second key frame is a highlight frame node, if yes, executing step S605.
And step S605, determining that the first key frame picture is a picture in the highlight video.
In a specific implementation, the first key frame picture is a key frame picture corresponding to the front time information in the time information carried by each key frame picture in the at least one key frame picture, and the second key frame picture is adjacent to the first key frame picture.
As described above, the terminal determines that the first key frame picture is the highlight moment picture node, and the terminal determines that the second key frame picture is the highlight moment picture node, and then the terminal fuses the first key frame picture and the second key frame picture, so that the time zone in this state can be obtained, and the video is cut according to the time zone, so that the highlight moment video can be obtained. It is to be understood that, in the above implementation, the first key frame picture is a picture in the above highlight video.
Step S605, judging whether the second key frame picture is a wonderful moment picture node;
step S606, if not, discarding the first key frame picture.
As described above, the terminal determines that the first key frame picture is a highlight picture node. Meanwhile, the terminal determines that the second key frame picture is not the highlight moment picture node, and at the moment, the terminal discards the first key frame picture.
By implementing the embodiment of the invention, the terminal can extract a plurality of key frame pictures (such as a first key frame picture and a second key frame picture) in the video according to the preset time interval, if the terminal determines that the first key frame picture is a highlight moment picture node, the terminal determines that the second key frame picture is a highlight moment picture node, and at the moment, the terminal determines that the first key frame picture is a picture in the highlight moment video; and if the terminal determines that the first key frame picture is the wonderful moment picture node, the terminal determines that the second key frame picture is not the wonderful moment picture node, and at the moment, the terminal discards the first key frame picture. In the process of extracting the picture at the wonderful moment, the problems of complex and complicated comparison process in the prior art can be solved, and the identification efficiency of the terminal can be improved. In the process of acquiring the video at the wonderful moment, the integrity of the video at the wonderful moment can be ensured, the phenomenon that the picture at the wonderful moment flashes in the video at the wonderful moment can be avoided, and the visual effect of a user can be improved.
In order to better implement the method of the embodiment of the present invention, the embodiment of the present invention further describes a schematic structural diagram of a terminal that belongs to the same inventive concept as the method embodiments described in fig. 1 to fig. 6. The following detailed description is made with reference to the accompanying drawings:
as shown in fig. 7, the terminal 700 includes:
an extracting unit 701, configured to extract at least one key frame picture in a video according to a preset time interval; wherein the key frame picture comprises wonderful moment characteristics; the wonderful moment feature is used for representing wonderful characteristics of the video;
an identifying unit 702, configured to identify whether a feature at a highlight moment in the key frame picture matches a target feature;
a determining unit 703, configured to determine that the key frame picture is a highlight moment picture node in the video if the identifying unit identifies that the highlight moment feature in the key frame picture matches the target feature.
Optionally, the at least one key frame picture includes a first key frame picture and a second key frame picture;
the key frame pictures carry time information, the time information is used for determining the first key frame picture in the at least one key frame picture, the first key frame picture is a key frame picture corresponding to the front time of the time information in the time information carried by each key frame picture in the at least one key frame picture, and the second key frame picture is adjacent to the first key frame picture;
the identifying unit 702 is specifically configured to identify whether a feature at a highlight moment in the first key frame picture matches a target feature;
the terminal 700 further includes:
a checking unit, configured to check the first key frame picture according to a preset fault-tolerant mechanism when the identifying unit 702 identifies that the feature at the highlight moment in the first key frame picture is not completely matched with the target feature;
the marking unit is used for marking the first key frame picture meeting the preset fault tolerance as an uncertain node after the checking unit checks the first key frame picture according to a preset fault tolerance mechanism;
a fusion unit; the determining unit is used for fusing the first key frame picture and the second key frame picture under the condition that the second key frame picture is determined to be a highlight moment picture node by the determining unit so as to obtain a highlight moment time region;
and the first clipping unit is used for clipping the video according to the time region of the highlight moment so as to obtain the highlight moment video of the video.
Optionally, a third key frame picture is adjacent to the second key frame picture; the third key frame picture is a picture behind the second key frame picture; the terminal 700 further comprises a first discarding unit;
the first discarding unit is configured to discard the first key frame picture when the second key frame picture is not a highlight moment picture node and the third key frame picture is not a highlight moment picture node after the marking unit marks the first key frame picture meeting a preset fault tolerance as an uncertain node.
Optionally, the at least one key frame picture includes a first key frame picture, a second key frame picture and a third key frame picture; the first key frame picture is adjacent to the second key frame picture, and the first key frame picture is also adjacent to the third key frame picture; the second key frame picture is a picture before the first key frame picture, and the third key frame is a picture after the first key frame picture;
the identifying unit 702 is specifically configured to identify whether a feature at a highlight moment in the first key frame picture matches a target feature;
the terminal 700 further comprises a second discarding unit;
the second discarding unit is configured to discard the first key frame picture when the second key frame picture is a highlight moment picture node and the third key frame picture is an uncertain node after the marking unit marks the first key frame picture meeting a preset fault tolerance as the uncertain node;
or, the fusion unit is further configured to fuse the first key frame picture, the second key frame picture and the third key frame picture to obtain a time region of the highlight moment when the second key frame picture is a highlight moment picture node and the third key frame picture is a highlight moment picture node.
Optionally, the terminal 700 further includes a second clipping unit and a binarization processing unit;
the second cutting unit is used for cutting the key frame picture after the extracting unit extracts at least one key frame picture in the video according to a preset time interval;
the binarization processing unit is used for carrying out image binarization processing on the cut key frame picture;
optionally, the at least one key frame picture includes a first key frame picture and a second key frame picture;
the key frame pictures carry time information, the time information is used for determining the first key frame picture in the at least one key frame picture, the first key frame picture is a key frame picture corresponding to the front time of the time information in the time information carried by each key frame picture in the at least one key frame picture, and the second key frame picture is adjacent to the first key frame picture;
the terminal 700 further comprises a processing unit and a third discarding unit;
the processing unit is used for determining that the first key frame picture is the picture in the highlight moment video under the condition that the second key frame picture is the highlight moment picture node after the key frame picture is determined to be the highlight moment picture node in the video by the determining unit;
the third discarding unit is configured to discard the first key frame picture if the second key frame picture is not a highlight moment picture node.
Optionally, the terminal 700 further includes a key frame picture determining unit and an obtaining unit;
the key frame picture determining unit is used for determining a plurality of key frame pictures containing the wonderful moment characteristics in the video before the extracting unit extracts at least one key frame picture in the video according to a preset time interval;
the acquisition unit is used for acquiring the time positions of the plurality of key frame pictures in the video; the temporal positions of the plurality of key frame pictures in the video are used to determine the preset time interval.
By implementing the embodiment of the invention, the terminal can extract a plurality of key frame pictures in the video according to the preset time interval, identify whether the wonderful moment feature in the key frame pictures is matched with the target feature, and determine the key frame pictures as wonderful moment picture nodes in the video under the condition of matching, so that the problems of complicated and complicated comparison process in the prior art can be solved, and the identification efficiency of the terminal can be improved. In the process of acquiring the video at the wonderful moment, the integrity of the video at the wonderful moment can be ensured, the phenomenon that the picture at the wonderful moment flashes in the video at the wonderful moment can be avoided, and the visual effect of a user can be improved.
In order to better implement the above scheme of the embodiment of the present invention, the present invention further provides another schematic structural diagram of the terminal, and the following detailed description is made with reference to the accompanying drawings:
as shown in fig. 8, which is a schematic structural diagram of another terminal provided in the embodiment of the present invention, the terminal 800 may include at least one processor 801, a communication bus 802, a memory 803, and at least one communication interface 804.
The processor 801 may be a general-purpose Central Processing Unit (CPU), a microprocessor, an Application-Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to control the execution of programs in accordance with the present invention.
The communication bus 802 may include a path that conveys information between the aforementioned components. The communication interface 804 may be any device, such as a transceiver, for communicating with other devices or communication Networks, such as ethernet, radio access Technology (RAN), Wireless Local Area Networks (WLAN), etc.
The Memory 803 may be a Read-Only Memory (ROM) or other type of static storage device that can store static information and instructions, a Random Access Memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable Programmable Read-Only Memory (EEPROM), a Compact Disc Read-Only Memory (CD-ROM) or other optical Disc storage, optical Disc storage (including Compact Disc, laser Disc, optical Disc, digital versatile Disc, blu-ray Disc, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to these. The memory may be self-contained and coupled to the processor via a bus. The memory may also be integral to the processor.
The memory 803 is used for storing program codes for implementing the present invention, and the processor 801 controls the execution of the program codes. The processor 801 is configured to execute the program code stored in the memory 803, and perform the following steps:
extracting at least one key frame picture in the video according to a preset time interval; wherein the key frame picture comprises wonderful moment characteristics; the wonderful moment feature is used for representing wonderful characteristics of the video;
identifying whether the wonderful moment features in the key frame picture are matched with target features or not;
and if so, determining the key frame picture as a highlight moment picture node in the video.
The key frame pictures carry time information, a first key frame picture in the at least one key frame picture is determined according to the time information, the first key frame picture is a key frame picture corresponding to the front time of the time information in the time information carried by each key frame picture in the at least one key frame picture, and a second key frame picture is adjacent to the first key frame picture; the processor 801 is further configured to:
if the wonderful moment feature in the first key frame picture is not completely matched with the target feature, checking the first key frame picture according to a preset fault-tolerant mechanism, and marking the first key frame picture meeting a preset fault-tolerant rate as an uncertain node;
if the second key frame picture is a highlight moment picture node, fusing the first key frame picture and the second key frame picture to obtain a highlight moment time region;
and cutting the video according to the time region of the wonderful moment to obtain the wonderful moment video of the video.
Wherein a third key frame picture is adjacent to the second key frame picture; the third key frame picture is a picture behind the second key frame picture;
the processor 801 is configured to, when a feature at a highlight moment in the first key frame picture is not completely matched with the target feature, check the first key frame picture according to a preset fault tolerance mechanism, and mark the first key frame picture meeting a preset fault tolerance as an uncertain node, further include:
and if the second key frame picture is not the wonderful moment picture node and the third key frame picture is not the wonderful moment picture node, discarding the first key frame picture.
The first key frame picture is adjacent to the second key frame picture, and the first key frame picture is also adjacent to the third key frame picture; the second key frame picture is a picture before the first key frame picture, and the third key frame is a picture after the first key frame picture; the processor 801 is further configured to:
if the wonderful moment feature in the first key frame picture is not completely matched with the target feature, checking the first key frame picture according to a preset fault-tolerant mechanism, and marking the first key frame picture meeting a preset fault-tolerant rate as an uncertain node;
if the second key frame picture is a wonderful moment picture node and the third key frame picture is an uncertain node, discarding the first key frame picture;
or,
and if the second key frame picture is a wonderful moment picture node and the third key frame picture is a wonderful moment picture node, fusing the first key frame picture, the second key frame picture and the third key frame picture to obtain a wonderful moment time region.
After the processor 801 is configured to extract at least one key frame picture in the video at a preset time interval, the method may further include:
and cutting the key frame picture, and carrying out image binarization processing on the cut key frame picture.
The first key frame picture is a key frame picture corresponding to the front time information in the time information carried by each key frame picture in the at least one key frame picture, and the second key frame picture is adjacent to the first key frame picture;
after the processor 801 is configured to determine that the key frame picture is a highlight picture node in the video, the method may further include:
if the second key frame picture is a highlight moment picture node, the first key frame picture is a picture in a highlight moment video;
and if the second key frame picture is not the highlight moment picture node, discarding the first key frame picture.
Before the processor 801 is configured to extract at least one key frame picture in a video at a preset time interval, the method may further include:
determining a plurality of key frame pictures containing the wonderful moment features in the video and acquiring the time positions of the key frame pictures in the video.
In particular implementations, processor 801 may include one or more CPUs, such as CPU0 and CPU1 in fig. 8, as an alternative embodiment.
In this implementation, as an alternative embodiment, terminal 800 may include multiple processors, such as processor 801 and processor 808 of fig. 8. Each of these processors may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).
In this implementation, as an alternative embodiment, the terminal 800 may further include an output device 805 and an input device 806. The output device 805 is in communication with the processor 801 and may display information in a variety of ways. For example, the output device 805 may be a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) Display device, a Cathode Ray Tube (CRT) Display device, a projector (projector), or the like. The input device 806 is in communication with the processor 801 and can accept user input in a variety of ways. For example, the input device 806 may be a mouse, a keyboard, a touch screen device, or a sensing device, among others.
In a specific implementation, the terminal 800 may include a Mobile phone, a tablet computer, a Personal Digital Assistant (PDA), a Mobile Internet Device (MID), an intelligent wearable Device (such as a smart watch and a smart bracelet), and other terminals that can be used by various users, and the embodiment of the present invention is not limited in particular.
Embodiments of the present invention also provide a computer storage medium for storing computer software instructions for the terminal shown in fig. 1 to 6, which includes a program for executing the method embodiments. By executing the stored program, extraction of a highlight picture in the video can be realized.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.
Claims (10)
1. A video highlight extraction method is characterized by comprising the following steps:
extracting at least one key frame picture in the video according to a preset time interval; wherein the key frame picture comprises wonderful moment characteristics; the wonderful moment feature is used for representing wonderful characteristics of the video;
identifying whether the wonderful moment features in the key frame picture are matched with target features or not;
and if so, determining the key frame picture as a highlight moment picture node in the video.
2. The method of claim 1, wherein the at least one key frame picture comprises a first key frame picture and a second key frame picture;
the key frame pictures carry time information, the time information is used for determining the first key frame picture in the at least one key frame picture, the first key frame picture is a key frame picture corresponding to the front time of the time information in the time information carried by each key frame picture in the at least one key frame picture, and the second key frame picture is adjacent to the first key frame picture;
the identifying whether the highlight features in the key frame picture are matched with the target features comprises: identifying whether the wonderful moment feature in the first key frame picture is matched with a target feature;
the method further comprises the following steps:
if the wonderful moment feature in the first key frame picture is not completely matched with the target feature, checking the first key frame picture according to a preset fault-tolerant mechanism, and marking the first key frame picture meeting a preset fault-tolerant rate as an uncertain node;
if the second key frame picture is a highlight moment picture node, fusing the first key frame picture and the second key frame picture to obtain a highlight moment time region;
and cutting the video according to the time region of the wonderful moment to obtain the wonderful moment video of the video.
3. The method of claim 2, wherein a third key frame picture is adjacent to the second key frame picture; the third key frame picture is a picture behind the second key frame picture;
if the feature of the highlight moment in the first key frame picture is not completely matched with the target feature, the method further includes the following steps of verifying the first key frame picture according to a preset fault tolerance mechanism, and marking the first key frame picture meeting a preset fault tolerance as an uncertain node:
and if the second key frame picture is not the wonderful moment picture node and the third key frame picture is not the wonderful moment picture node, discarding the first key frame picture.
4. The method of claim 1, wherein the at least one key frame picture comprises a first key frame picture, a second key frame picture, and a third key frame picture; the first key frame picture is adjacent to the second key frame picture, and the first key frame picture is also adjacent to the third key frame picture; the second key frame picture is a picture before the first key frame picture, and the third key frame is a picture after the first key frame picture;
the identifying whether the highlight features in the key frame picture are matched with the target features comprises: identifying whether the wonderful moment feature in the first key frame picture is matched with a target feature;
the method further comprises the following steps:
if the wonderful moment feature in the first key frame picture is not completely matched with the target feature, checking the first key frame picture according to a preset fault-tolerant mechanism, and marking the first key frame picture meeting a preset fault-tolerant rate as an uncertain node;
if the second key frame picture is a wonderful moment picture node and the third key frame picture is an uncertain node, discarding the first key frame picture;
or,
and if the second key frame picture is a wonderful moment picture node and the third key frame picture is a wonderful moment picture node, fusing the first key frame picture, the second key frame picture and the third key frame picture to obtain a wonderful moment time region.
5. The method according to claim 1, wherein after extracting at least one key frame picture in the video at a preset time interval, the method further comprises:
and cutting the key frame picture, and carrying out image binarization processing on the cut key frame picture.
6. The method of claim 1, wherein the at least one key frame picture comprises a first key frame picture and a second key frame picture;
the key frame pictures carry time information, the time information is used for determining the first key frame picture in the at least one key frame picture, the first key frame picture is a key frame picture corresponding to the front time of the time information in the time information carried by each key frame picture in the at least one key frame picture, and the second key frame picture is adjacent to the first key frame picture;
after determining that the key frame picture is a highlight picture node in the video, the method further includes:
if the second key frame picture is a highlight moment picture node, the first key frame picture is a picture in a highlight moment video;
and if the second key frame picture is not the highlight moment picture node, discarding the first key frame picture.
7. The method according to claim 1, wherein before extracting at least one key frame picture in the video at a preset time interval, the method further comprises:
determining a plurality of key frame pictures containing the wonderful moment features in the video and acquiring the time positions of the key frame pictures in the video; the temporal positions of the plurality of key frame pictures in the video are used to determine the preset time interval.
8. A terminal, characterized in that it comprises means for performing the method according to any of claims 1-7.
9. A terminal, comprising a processor, an input device, an output device, and a memory, the processor, the input device, the output device, and the memory being interconnected, wherein the memory is configured to store a computer program comprising program instructions, the processor being configured to invoke the program instructions to perform the method of any of claims 1-7.
10. A computer-readable storage medium, characterized in that the computer storage medium stores a computer program comprising program instructions that, when executed by a processor, cause the processor to perform the method according to any of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810893778.8A CN109068150A (en) | 2018-08-07 | 2018-08-07 | A kind of excellent picture extracting method, terminal and the computer-readable medium of video |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810893778.8A CN109068150A (en) | 2018-08-07 | 2018-08-07 | A kind of excellent picture extracting method, terminal and the computer-readable medium of video |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109068150A true CN109068150A (en) | 2018-12-21 |
Family
ID=64678079
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810893778.8A Pending CN109068150A (en) | 2018-08-07 | 2018-08-07 | A kind of excellent picture extracting method, terminal and the computer-readable medium of video |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109068150A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110009004A (en) * | 2019-03-14 | 2019-07-12 | 努比亚技术有限公司 | Image processing method, computer equipment and storage medium |
CN111081105A (en) * | 2019-07-17 | 2020-04-28 | 广东小天才科技有限公司 | Dictation detection method in black screen standby state and electronic equipment |
CN112423021A (en) * | 2020-11-18 | 2021-02-26 | 北京有竹居网络技术有限公司 | Video processing method and device, readable medium and electronic equipment |
CN112632329A (en) * | 2020-12-18 | 2021-04-09 | 咪咕互动娱乐有限公司 | Video extraction method and device, electronic equipment and storage medium |
CN113111782A (en) * | 2021-04-14 | 2021-07-13 | 中国工商银行股份有限公司 | Video monitoring method and device based on salient object detection |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1510907A (en) * | 2002-12-24 | 2004-07-07 | 中国科学院计算技术研究所 | Method for detecting exciting part in sports game video frequency |
CN101127866A (en) * | 2007-08-10 | 2008-02-20 | 西安交通大学 | A method for detecting wonderful section of football match video |
CN101431689A (en) * | 2007-11-05 | 2009-05-13 | 华为技术有限公司 | Method and device for generating video abstract |
CN102750383A (en) * | 2012-06-28 | 2012-10-24 | 中国科学院软件研究所 | Spiral abstract generation method oriented to video content |
US20140325568A1 (en) * | 2013-04-26 | 2014-10-30 | Microsoft Corporation | Dynamic creation of highlight reel tv show |
EP3044703A1 (en) * | 2013-09-11 | 2016-07-20 | Cinsay, Inc. | Dynamic binding of video content |
CN107509115A (en) * | 2017-08-29 | 2017-12-22 | 武汉斗鱼网络科技有限公司 | A kind of method and device for obtaining live middle Wonderful time picture of playing |
CN108062409A (en) * | 2017-12-29 | 2018-05-22 | 北京奇艺世纪科技有限公司 | Generation method, device and the electronic equipment of live video summary |
-
2018
- 2018-08-07 CN CN201810893778.8A patent/CN109068150A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1510907A (en) * | 2002-12-24 | 2004-07-07 | 中国科学院计算技术研究所 | Method for detecting exciting part in sports game video frequency |
CN101127866A (en) * | 2007-08-10 | 2008-02-20 | 西安交通大学 | A method for detecting wonderful section of football match video |
CN101431689A (en) * | 2007-11-05 | 2009-05-13 | 华为技术有限公司 | Method and device for generating video abstract |
CN102750383A (en) * | 2012-06-28 | 2012-10-24 | 中国科学院软件研究所 | Spiral abstract generation method oriented to video content |
US20140325568A1 (en) * | 2013-04-26 | 2014-10-30 | Microsoft Corporation | Dynamic creation of highlight reel tv show |
EP3044703A1 (en) * | 2013-09-11 | 2016-07-20 | Cinsay, Inc. | Dynamic binding of video content |
CN107509115A (en) * | 2017-08-29 | 2017-12-22 | 武汉斗鱼网络科技有限公司 | A kind of method and device for obtaining live middle Wonderful time picture of playing |
CN108062409A (en) * | 2017-12-29 | 2018-05-22 | 北京奇艺世纪科技有限公司 | Generation method, device and the electronic equipment of live video summary |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110009004A (en) * | 2019-03-14 | 2019-07-12 | 努比亚技术有限公司 | Image processing method, computer equipment and storage medium |
CN110009004B (en) * | 2019-03-14 | 2023-09-01 | 努比亚技术有限公司 | Image data processing method, computer device, and storage medium |
CN111081105A (en) * | 2019-07-17 | 2020-04-28 | 广东小天才科技有限公司 | Dictation detection method in black screen standby state and electronic equipment |
CN112423021A (en) * | 2020-11-18 | 2021-02-26 | 北京有竹居网络技术有限公司 | Video processing method and device, readable medium and electronic equipment |
US11922597B2 (en) | 2020-11-18 | 2024-03-05 | Beijing Youzhuju Network Technology Co., Ltd. | Video processing method and apparatus, readable medium, and electronic device |
CN112632329A (en) * | 2020-12-18 | 2021-04-09 | 咪咕互动娱乐有限公司 | Video extraction method and device, electronic equipment and storage medium |
CN113111782A (en) * | 2021-04-14 | 2021-07-13 | 中国工商银行股份有限公司 | Video monitoring method and device based on salient object detection |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109068150A (en) | A kind of excellent picture extracting method, terminal and the computer-readable medium of video | |
CN106021421B (en) | method and device for accelerating webpage rendering | |
CN105518712B (en) | Keyword notification method and device based on character recognition | |
CN105744292A (en) | Video data processing method and device | |
CN108304368B (en) | Text information type identification method and device, storage medium and processor | |
US20140379328A1 (en) | Apparatus and method for outputting image according to text input in real time | |
CN107111761B (en) | Techniques for providing user image capture feedback for improved machine language translation | |
US20200218772A1 (en) | Method and apparatus for dynamically identifying a user of an account for posting images | |
CN106227483B (en) | Display control method and mobile terminal | |
US10438085B2 (en) | Image analysis apparatus, image analysis method, and storage medium | |
CN107203764A (en) | Long microblog picture recognition methods and device | |
CN108898649A (en) | Image processing method and device | |
KR102293416B1 (en) | Communication device, server and communication method thereof | |
CN103986981A (en) | Recognition method and device of scenario segments of multimedia files | |
US20180336243A1 (en) | Image Search Method, Apparatus and Storage Medium | |
CN113297416A (en) | Video data storage method and device, electronic equipment and readable storage medium | |
CN112973122A (en) | Game role makeup method and device and electronic equipment | |
CN110598115A (en) | Sensitive webpage identification method and system based on artificial intelligence multi-engine | |
TW201816659A (en) | Method and apparatus for identifying bar code | |
WO2023071180A1 (en) | Authenticity identification method and apparatus, electronic device, and storage medium | |
CN109299948A (en) | Red packet sending method and device, wearable device and storage medium | |
CN113822280B (en) | Text recognition method, device, system and nonvolatile storage medium | |
CN106503005B (en) | Information processing method and terminal | |
US11749021B2 (en) | Retrieval device, control method, and non-transitory storage medium | |
CN109583453B (en) | Image identification method and device, data identification method and terminal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181221 |