Video frame selection method, device, electronic device and storage medium

By calculating the comprehensive quality score of video frames in multi-objective video and updating the candidate video frames, the problem of too many optimal video frames in the prior art is solved, and the effect of accurately selecting video frames within the preset period is achieved.

CN114677320BActive Publication Date: 2025-03-25SHENZHEN INTELLIFUSION TECHNOLOGIES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011554907.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-24
Publication Date
2025-03-25
Estimated Expiration
2040-12-24

AI Technical Summary

Technical Problem

In the prior art, in multi-target video, the process of target selection is likely to lead to excessive optimal video frames, affecting subsequent target analysis and storage efficiency.

Method used

By obtaining the current video frame, calculating its comprehensive quality score, comparing it with the pre-stored comprehensive quality score, updating the candidate video frame and pre-stored comprehensive quality score, and finally selecting the best video frame within the preset period.

Benefits of technology

While ensuring the quality of video frames, the number of video frames selected in multi-target videos is reduced, and the accuracy and efficiency of video frame selection is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114677320B_ABST
    Figure CN114677320B_ABST
Patent Text Reader

Abstract

The present application is applicable to the field of video processing technology, and provides a video frame selection method, device, electronic device and storage medium, including: obtaining a current video frame; if the current video frame contains all first targets, then determining a first comprehensive quality score of the current video frame based on the quality of each first target in the current video frame; the candidate video frame has a corresponding pre-stored comprehensive quality score, and the pre-stored comprehensive quality score is a comprehensive quality score obtained based on the quality of each first target in the candidate video frame; according to the comparison result of the first comprehensive quality score and the pre-stored comprehensive quality score, updating the candidate video frame and the corresponding pre-stored comprehensive quality score; if it is detected that the preset period has been reached, the latest candidate video frame is determined as the first selected video frame. The embodiment of the present application can accurately and effectively select video frames.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of video processing technology, and in particular, relates to a video frame selection method, device, electronic device and storage medium. Background Art

[0002] At present, there are often three steps in video analysis: target detection, target tracking and target optimization. Among them, target detection is used to discover the target, target tracking is used to continuously track the discovered target, and target optimization is to select the video frame with the best target capture quality from each frame of the video for output.

[0003] In the prior art, for a video with multiple targets, the target selection is to select the optimal video frames corresponding to each target in the video in turn and output them. However, as the number and types of targets increase, the optimal video frames corresponding to each target are more likely to be different video frames, resulting in too many optimal video frames being selected in the end, which is not conducive to subsequent target analysis or storage based on the optimal video frames. Summary of the invention

[0004] In view of this, embodiments of the present application provide a video frame selection method, device, and electronic device to solve the problem of how to accurately and effectively select video frames in the prior art.

[0005] A first aspect of an embodiment of the present application provides a video frame selection method, comprising:

[0006] Get the current video frame;

[0007] If the current video frame contains all the first targets, determining a first comprehensive quality score of the current video frame based on the quality of each of the first targets in the current video frame; wherein the first target is a target existing in the current candidate video frame; the candidate video frame has a corresponding pre-stored comprehensive quality score, and the pre-stored comprehensive quality score is a comprehensive quality score obtained based on the quality of each of the first targets in the candidate video frame;

[0008] updating the candidate video frame and the corresponding pre-stored comprehensive quality score according to a comparison result between the first comprehensive quality score and the pre-stored comprehensive quality score;

[0009] If it is detected that the preset period has been reached, the latest candidate video frame is determined as the first selected video frame; otherwise, the next video frame of the current video frame is used as the latest current video frame, and the step of obtaining the current video frame and subsequent steps are returned to execute.

[0010] A second aspect of an embodiment of the present application provides a video frame selection device, comprising:

[0011] An acquisition unit, used for acquiring a current video frame;

[0012] A first comprehensive quality score determination unit is configured to determine a first comprehensive quality score of the current video frame based on the quality of each of the first targets in the current video frame if the current video frame contains all the first targets; wherein the first targets are targets existing in the current candidate video frame; the candidate video frame has a corresponding pre-stored comprehensive quality score, and the pre-stored comprehensive quality score is a comprehensive quality score obtained based on the quality of each of the first targets in the candidate video frame;

[0013] an updating unit, configured to update the candidate video frame and the corresponding pre-stored comprehensive quality score according to a comparison result between the first comprehensive quality score and the pre-stored comprehensive quality score;

[0014] The selection unit is used to determine the latest candidate video frame as the first selected video frame if it is detected that the preset period has been reached; otherwise, the next frame of the current video frame is used as the latest current video frame, and return to execute the step of obtaining the current video frame and subsequent steps.

[0015] A third aspect of an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the electronic device implements the steps of the video frame selection method.

[0016] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the electronic device implements the steps of the video frame selection method.

[0017] A fifth aspect of an embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes the video frame selection method described in the first aspect.

[0018] Compared with the prior art, the embodiment of the present application has the following beneficial effects: in the embodiment of the present application, within a preset period, the target included in the current candidate video frame is taken as the first target, and after each current video frame is obtained, the first comprehensive quality score of the current video frame can be comprehensively calculated based on the quality of each first target in the current video frame, and the comparison result of the first comprehensive quality score and the pre-stored comprehensive quality score corresponding to the candidate video frame is determined, and the candidate video frame is updated and the pre-stored comprehensive quality score is updated according to the comparison result, and finally when the preset period arrives, the latest candidate video frame is determined as the first selected video frame. Since the first comprehensive quality score and the pre-stored comprehensive quality score can comprehensively reflect the quality of each first target, the first selected video frame finally determined based on the comparison of the first comprehensive quality score and the pre-stored comprehensive quality score and the continuous updating of the candidate video frame is a video frame selected by comprehensively considering the quality of multiple targets within the preset period, so that the best video frame can be accurately selected within the preset period in the video of multiple targets, while ensuring the quality of the selected video frame, the number of video frames selected in the video of multiple targets is greatly reduced, thereby accurately and effectively completing the selection of video frames. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0020] Figure 1 It is a schematic diagram of an implementation flow of a video frame selection method provided in an embodiment of the present application;

[0021] Figure 2 is a schematic diagram of a video frame selection device provided in an embodiment of the present application;

[0022] Figure 3 It is a schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0023] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0024] In order to illustrate the technical solution described in this application, a specific embodiment is provided below for illustration.

[0025] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0026] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0027] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0028] As used in this specification and the appended claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0029] In addition, in the description of the present application, the terms "first", "second", "third", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0030] At present, in the target selection technology of videos, for videos with multiple targets, the optimal video frames corresponding to each target are often selected from the video in turn for output. However, with the increase in the number and types of targets, the optimal video frames corresponding to each target are more likely to be different video frames, resulting in too many optimal video frames being finally selected. In extreme cases, the optimal target may exist in every frame of the video, resulting in every frame of the video needing to be output as the optimal video frame, that is, the "output avalanche" phenomenon, which will bring tremendous pressure to the subsequent secondary analysis of target attributes and the permanent storage of data. In order to solve the technical problem, the embodiment of the present application provides a video frame selection method, device, electronic device and storage medium. Within a preset period, the target included in the current candidate video frame is taken as the first target. After each current video frame is obtained, the first comprehensive quality score of the current video frame can be comprehensively calculated based on the quality of each first target in the current video frame, and the comparison result of the first comprehensive quality score and the pre-stored comprehensive quality score corresponding to the candidate video frame is determined. According to the comparison result, the candidate video frame is updated and the pre-stored comprehensive quality score is updated. Finally, when the preset period arrives, the latest candidate video frame is determined as the first selected video frame. Since the first comprehensive quality score and the pre-stored comprehensive quality score can comprehensively reflect the quality of each first target, the first selected video frame finally determined based on the comparison of the first comprehensive quality score and the pre-stored comprehensive quality score and the continuous updating of the candidate video frame is a video frame selected by comprehensively considering the quality of multiple targets within the preset period, so that the best video frame can be accurately selected within the preset period in the video of multiple targets, while ensuring the quality of the selected video frame, the number of video frames selected in the video of multiple targets is greatly reduced, thereby accurately and effectively completing the selection of video frames.

[0031] Embodiment 1:

[0032] Figure 1 The flowchart of a video frame selection method provided by an embodiment of the present application is shown. The execution subject of the video frame selection method is an electronic device, which includes but is not limited to a computer, a server, a mobile terminal or a camera. Figure 1 The video frame selection method shown is detailed as follows:

[0033] In S101, the current video frame is obtained.

[0034] In one embodiment, the current video frame is a newly generated video frame in a video stream shot in real time. In another embodiment, the current video frame is a video frame sequentially obtained from a multi-target video, and the multi-target video is a video shot in advance containing at least two targets. Specifically, a decoding operation is performed on the multi-target video, and each decoding obtains a video frame, that is, the video frame is input as the current video frame for processing. In the embodiment of the present application, the types of targets include but are not limited to human faces, human bodies, animal bodies, specified objects, etc.

[0035] In S102, if the current video frame contains all the first targets, the first comprehensive quality score of the current video frame is determined based on the quality of each of the first targets in the current video frame; wherein the first target is a target existing in the current candidate video frame; the candidate video frame has a corresponding pre-stored comprehensive quality score, and the pre-stored comprehensive quality score is a comprehensive quality score obtained based on the quality of each of the first targets in the candidate video frame.

[0036] In the embodiment of the present application, the candidate video frame is a candidate optimal video frame, that is, a video frame that can present the image information of each target with the highest quality among the video frames acquired within a preset period before the current video frame. Among them, the target contained in the candidate video frame is called the first target, and the comprehensive quality score corresponding to the candidate video frame is a pre-stored comprehensive quality score. Specifically, the pre-stored comprehensive quality score corresponding to the candidate video frame is a score calculated based on the quality of each first target in the candidate video frame through a preset comprehensive quality algorithm.

[0037] Optionally, if the current video frame is the first video frame in the video stream data or the pre-stored multi-target video, the current candidate video frame is empty. At this time, the current video frame can be directly stored as a candidate video frame and jump to step S104 to execute subsequent steps.

[0038] If the current candidate video frame is not empty, then in this step, after the current video frame is obtained, it is detected whether the current video frame contains all the first targets. If the current video frame contains all the first targets, that is, the targets contained in the current video frame are completely consistent with the first targets in the candidate video frame, or are more than the first targets in the candidate video, then according to the quality of each first target contained in the current video frame, the comprehensive quality score of the current video frame is calculated by a preset comprehensive quality algorithm. In order to distinguish, the comprehensive quality score here is called the first comprehensive quality score.

[0039] In an embodiment of the present application, the quality of the target is used to characterize the image display effect of the target in the video frame. Specifically, it can be measured by any one or more indicators such as the clarity, completeness, brightness, and posture angle of the image area where the target is located in the video frame. Exemplarily, assuming that the target of the embodiment of the present application is a face target, the posture angle information of the face can be used as an indicator to measure the quality of the target. When the face target is determined to be a frontal face image based on the posture angle information of the face, the quality of the face target is determined to be high, and a higher quality score is set for the face target; when the face target is determined to be a side face image based on the posture angle information of the face, the quality of the face target is determined to be low, and a lower quality score is set for the face target. Specifically, the above-mentioned comprehensive quality algorithm may include:

[0040] If the number of targets to be calculated is less than a preset number (eg, 3), the quality scores of the targets to be calculated in the video frame to be calculated are added together and divided by the total number of targets to be calculated to obtain a comprehensive quality score.

[0041] If the number of targets to be calculated is greater than or equal to the preset number, then:

[0042] Delete the target with the highest quality score and the target with the lowest quality score from each target to be calculated to obtain the actual calculation target;

[0043] The quality scores of each actual calculation target in the video frame to be calculated are added and divided by the total number of the actual calculation targets to obtain a comprehensive quality score.

[0044] Specifically, in this step, when it is necessary to calculate the first comprehensive quality score of the current video frame based on the instruction of the first target of the current video frame, the current video frame is used as the video frame to be calculated, and all the first targets contained in the current video frame are used as the targets to be calculated. Through the steps of the above-mentioned comprehensive quality algorithm, the comprehensive quality score calculated is the first comprehensive quality score. Through the above-mentioned comprehensive quality algorithm, the first comprehensive quality score of the current video frame can be accurately measured.

[0045] In S103, the candidate video frame and the corresponding pre-stored comprehensive quality score are updated according to the comparison result between the first comprehensive quality score and the pre-stored comprehensive quality score.

[0046] In an embodiment of the present application, the calculated first comprehensive quality score of the current video frame is compared with the pre-stored comprehensive quality score corresponding to the candidate video frame, the candidate video frame is updated according to the comparison result, and the comprehensive quality score corresponding to the latest candidate video frame is determined as the updated pre-stored comprehensive quality score. Exemplarily, when the first comprehensive quality score is greater than the pre-stored comprehensive quality score, it means that the current video frame is more capable of comprehensively presenting various targets with better image effects than the current candidate video frame. At this time, the current candidate video frame is eliminated, and the current video frame is used as a new candidate video frame. At the same time, the comprehensive quality score corresponding to the current video frame is used as a new pre-stored comprehensive quality score. On the contrary, if the first comprehensive quality score is less than or equal to the pre-stored comprehensive quality score, it means that the target display effect of the current video frame is not better than that of the candidate video frame, so the candidate video frame and the corresponding comprehensive quality score at this time can remain unchanged.

[0047] In S104, if it is detected that the preset period has been reached, the latest candidate video frame is determined as the first selected video frame; otherwise, the next video frame of the current video frame is used as the latest current video frame, and the step of obtaining the current video frame and subsequent steps are returned to execute.

[0048] The preset period in the embodiment of the present application is a preset target selection period, and the first selected video frame is the best video frame within the preset period, that is, a video frame with a high comprehensive quality score that can best present multiple targets. Among them, the preset period can be a preset number of frames or video duration. For example, taking 10 video frames as a preset period, an optimal video frame (that is, the current latest candidate video frame) is determined as the first selected video frame in every 10 video frames. For another example, taking a video duration of 1 minute as a preset period, every time the video duration reaches 1 minute, the current latest candidate video frame is determined as the first selected video frame. Optionally, in one embodiment, the preset period can also be the total number of video frames included in the current multi-target video, or the total duration of the current multi-target video, that is, the multi-target video frame only needs to obtain one first selected video frame.

[0049] Specifically, each time after executing step S103, it is detected whether the preset period has been reached. If not, it means that the target selection work within the current preset period has not been completed. At this time, the next video frame of the current video frame, such as the next latest video frame obtained by the current real-time video stream, or the next video frame in the multi-target video, is used as the latest current video frame, and returns to execute step S101 and subsequent steps, and continues to calculate and compare the comprehensive quality score to continue the target selection work within the preset period. If it is detected that the preset period has been reached, it is determined that the target selection work of the current preset period is completed, and the latest candidate video frame is determined as the first selected video frame. Optionally, after determining the first selected video frame, the first selected video frame can be saved to a specified storage unit, so that the local end or other devices can perform target analysis efficiently and accurately based on the first selected video frame saved in the storage unit. Optionally, after determining the first selected video frame, the first selected video frame can also be output to a specified display device for display, and the first selected video frame can also be sent to a specified electronic device for supervision personnel to view. Optionally, after completing the target optimization work of this preset cycle and determining the first selected video frame in this preset cycle, the counting of the next preset cycle can be restarted and return to step S101 to perform the target optimization work of the next preset cycle.

[0050] In the embodiment of the present application, within a preset period, the target included in the current candidate video frame is taken as the first target. After each current video frame is obtained, the first comprehensive quality score of the current video frame can be comprehensively calculated based on the quality of each first target in the current video frame, and the comparison result of the first comprehensive quality score and the pre-stored comprehensive quality score corresponding to the candidate video frame is determined. The candidate video frame is updated and the pre-stored comprehensive quality score is updated according to the comparison result. Finally, when the preset period is reached, the latest candidate video frame is determined as the first selected video frame. Since the first comprehensive quality score and the pre-stored comprehensive quality score can comprehensively reflect the quality of each first target, the first selected video frame finally determined based on the comparison of the first comprehensive quality score and the pre-stored comprehensive quality score and the continuous updating of the candidate video frame is a video frame selected by comprehensively considering the quality of multiple targets within the preset period, so that the best video frame can be accurately selected within the preset period in the video of multiple targets, while ensuring the quality of the selected video frame, the number of video frames selected in the video of multiple targets is greatly reduced, thereby accurately and effectively completing the selection of video frames.

[0051] Optionally, in the above step S102, if all the targets included in the current video frame are first targets, then the step S102 specifically includes:

[0052] If the first comprehensive quality score is greater than the pre-stored comprehensive quality score, the current video frame is used as an updated candidate video frame, and the first comprehensive quality score is used as an updated pre-stored comprehensive quality score.

[0053] In the embodiment of the present application, it is specifically the case that the current video frame contains all the first targets, and each target contained in the current video frame is the first target, that is, the target contained in the current video frame is completely consistent with the target contained in the candidate video frame. Since the current video frame is consistent with the target contained in the candidate video frame, the frame with a higher comprehensive quality score in the two video frames can be directly determined as the latest candidate video frame. Specifically, if the first comprehensive quality score corresponding to the current video frame is greater than the pre-stored comprehensive quality score corresponding to the current candidate video frame, it is determined that the current video frame is better than the candidate video frame. At this time, the candidate video frame is eliminated, and the current video frame is used as the updated candidate video frame, and the first comprehensive quality score corresponds to the updated pre-stored comprehensive quality score. On the contrary, if the current first comprehensive quality score is not greater than the pre-stored comprehensive quality score, it means that there is no need to replace the candidate video frame at present, and the original candidate video frame and the pre-stored comprehensive quality score are maintained.

[0054] Optionally, step S102 further includes:

[0055] If the first comprehensive quality score is equal to the pre-stored comprehensive quality score, comparing the quality of the current minimum quality target and the quality of the pre-stored minimum quality target; wherein the current minimum quality target is the first target with the lowest quality in the current video frame; and the pre-stored minimum quality target is the first target with the lowest quality in the pending video frame;

[0056] If the quality of the current minimum quality target is higher than the quality of the pre-stored minimum quality target, the current video frame is used as an updated candidate video frame, and the first comprehensive quality score is used as an updated pre-stored comprehensive quality score.

[0057] In the embodiment of the present application, the situation where the first comprehensive quality score is equal to the pre-stored comprehensive quality score is further considered. At this time, a better video frame is further determined from the two video frames by comparing the lowest quality targets. Specifically, the first target with the lowest quality is found from the current video frame as the current lowest quality target, and the first target with the lowest quality is found from the candidate video frame as the pre-stored lowest quality target. Then, the current lowest quality target and the pre-stored lowest quality target are compared. If the quality of the current lowest quality target is higher than the quality of the pre-stored lowest quality target, it means that the display effect of the current video frame is better than the display effect of the current candidate video frame. At this time, the current video frame is used as the updated candidate video frame, and the first comprehensive quality score corresponding to the current video frame is used as the updated pre-stored comprehensive quality score. On the contrary, if the quality of the current lowest quality target is not higher than the quality of the pre-stored lowest quality target, the original candidate video frame and the pre-stored comprehensive quality score are kept unchanged.

[0058] In the embodiment of the present application, when the targets of the current video frame and the candidate video frame are completely consistent, the one with a higher quality score can be directly determined as the latest candidate video frame by comparing the first comprehensive quality score with the pre-stored comprehensive quality score, so that when the targets of the two video frames are completely consistent, the target selection can be accurately performed. And further, when the first comprehensive quality score is equal to the pre-stored quality score, the better video frame can be further accurately determined by comparing the minimum quality target.

[0059] Optionally, if the current video frame includes, in addition to all the first targets of the candidate video frame, a second target that does not exist in the candidate video frame, the above step S102 includes:

[0060] A1: updating the candidate video frame according to a comparison result between the first comprehensive quality score and the pre-stored comprehensive quality score;

[0061] A2: Determine a second comprehensive quality score of the current video frame based on the quality of each target included in the current video frame, and use the second comprehensive quality score as the updated pre-stored comprehensive quality score.

[0062] In the embodiment of the present application, specifically, the current video frame includes all the first targets of the candidate video frame, and also includes a newly added second target that does not exist in the candidate video frame.

[0063] In step A1, the candidate video frame is updated according to the comparison result between the first comprehensive quality score and the pre-stored comprehensive quality score. Specifically, since the current video frame contains a newly added target that does not exist in the candidate video frame, namely, the second target, usually no matter whether the first comprehensive quality score is greater than, equal to, or less than the pre-stored comprehensive quality score, the current video frame at this time is used as the updated candidate video frame. However, for different comparison results, the steps for updating the candidate video frame are different. Specifically, step A1 includes:

[0064] B1: If the first comprehensive quality score is greater than or equal to the pre-stored comprehensive quality score, discard the current candidate video frame and use the current video frame as an updated candidate video frame;

[0065] B2: If the first comprehensive quality score is less than the pre-stored comprehensive quality score, the current candidate video frame is determined as the second selected video frame, and the current video frame is used as the updated candidate video frame.

[0066] In B1, when the first comprehensive quality score is greater than or equal to the pre-stored comprehensive quality score, it means that the presentation effect of the current video frame on the first target is better than the presentation effect of the candidate video frame on the first target, or the presentation effect on the first target is the same as the presentation effect of the candidate video frame on the first target, but considering that the current video frame can present more targets (that is, the second target other than the first target), the current candidate video frame can be directly discarded at this time, and the current video frame can be used as the updated candidate video frame.

[0067] In B2, when the first comprehensive quality score is less than the pre-stored comprehensive quality score, it means that the presentation effect of the current video frame on the first target is worse than the presentation effect of the candidate video frame on the first target. However, since the current video frame contains the newly added second target, the current video frame still needs to be used as the updated candidate video frame. However, at this time, in order to ensure that a video frame that can present the first target with higher quality can be selected, the current candidate video frame with a higher comprehensive quality score of the current first target (i.e., a higher pre-stored comprehensive quality score) can be first determined as the second selected video frame, and the second selected video frame is the video frame that can best present the current first target within a preset period. After selecting the second selected video frame, the second selected video frame can be output to a preset storage unit so that the first target can be accurately analyzed based on the second selected video frame. After determining the second selected video frame, the current video frame is used as the updated candidate video frame, and the comprehensive quality score is continued to be compared with the subsequent video frames.

[0068] In an embodiment of the present application, since the update method of the candidate video frame can be determined based on the comparison result between the first comprehensive quality score and the pre-stored comprehensive quality score, when the first comprehensive quality score is less than the pre-stored comprehensive quality score, the current candidate video frame is selected as the second selected video frame, thereby ensuring that the final selected video frame presents each target with the highest possible quality.

[0069] In step A2, since the first comprehensive quality score of the current video frame is calculated based on the quality of each first target, after the current video frame is updated to a candidate video frame, the corresponding updated pre-stored comprehensive quality score needs to be able to fully reflect the comprehensive quality of all targets contained in the candidate video frame. Therefore, at this time, it is necessary to calculate the comprehensive quality score based on the quality of all targets contained in the current video frame (i.e., the updated candidate video frame) (i.e., the first target and the second target are used as the targets to be calculated, and the calculation is performed through the above-mentioned comprehensive quality algorithm). In order to distinguish, the comprehensive quality score calculated at this time is called the second comprehensive quality score. Afterwards, the second comprehensive quality score is used as the updated pre-stored quality score.

[0070] In an embodiment of the present application, specifically taking into account the situation that the current video frame has a newly added target (i.e., the second target) relative to the candidate video frame, in this case, the corresponding update method can be selected to update the candidate video frame based on the comparison result of the first comprehensive quality score and the pre-stored comprehensive quality score, and the comprehensive quality score is recalculated based on all the targets contained in the current video frame, and the second comprehensive quality score calculated at this time is used as the pre-stored comprehensive quality score. Therefore, the candidate video frame and the corresponding pre-stored comprehensive quality score can be accurately updated, thereby ensuring the accuracy of video frame selection.

[0071] Optionally, after obtaining the current video frame, the method further includes:

[0072] C1: if the current video frame does not completely contain all the first targets, determining the current candidate video frame as the second selected video frame, and using the current video frame as the updated candidate video frame;

[0073] C2: Determine a second comprehensive quality score of the current video frame based on the quality of each target included in the current video frame, and use the second comprehensive quality score as the updated pre-stored comprehensive quality score.

[0074] In the above-mentioned step S102, the specific consideration is that the current video frame contains all the targets existing in the candidate video frame, that is, the situation of all the first targets. In C1, the specific consideration is the situation that the current video frame does not completely contain all the first targets, that is, the situation that the first targets currently exist disappear. At this time, since these disappeared first targets do not exist in the current video frame and subsequent video frames, in order to ensure that each selected video frame can contain each target without omission, therefore, it is necessary to timely determine the current candidate video frame as the second selected video frame, and perform corresponding output or storage operations, so that the subsequent target analysis can be carried out comprehensively and accurately based on the selected video frame. After determining the second selected video frame, the current video frame is used as the updated candidate video frame.

[0075] In C2, after taking the current video frame as the updated candidate video frame, it is necessary to calculate the comprehensive quality score based on the quality of each target contained in the current video frame (that is, taking all targets contained in the current video frame as the targets to be calculated, and calculating through the above-mentioned comprehensive quality algorithm) to accurately obtain the second comprehensive quality score. The second comprehensive quality score can fully reflect the comprehensive quality of all targets presented in the current video frame, and the second comprehensive quality score corresponds to the updated pre-stored comprehensive quality score.

[0076] In an embodiment of the present application, taking into further consideration the situation that the first target disappears in the current video frame, a candidate video frame containing the currently disappeared first target is promptly determined as the second selected video frame, so that the finally selected video frame can contain all targets without omission, thereby ensuring the comprehensiveness and accuracy of the video frame selection.

[0077] Optionally, in the above step S104, after determining the latest candidate video frame as the first selected video frame, the method further includes:

[0078] Removing information of output targets from target set information of the first selected video frame to obtain processed target set information; wherein the information of output targets is information of targets existing in other first selected video frames before the first selected video frame;

[0079] The first selected video frame and the processed target set information are output, and information of each target in the processed target set information is cached as information of the outputted target.

[0080] In the embodiment of the present application, in each frame of the video frame where the target exists, there is corresponding target set information, which is specifically used to describe the information of each target in the video frame, for example, any one or more of the information such as the position, unique identification, category, name, and detection score of the target, which can be obtained in advance through the target detection algorithm. Specifically, the position information of the target can be presented in the form of coordinate values, or it can be directly presented in the form of a rectangular frame used by the video frame to frame the position of the target. Therefore, in the embodiment of the present application, each video frame (including the current video frame, the candidate video frame, the first selected video frame, the second selected video frame) etc. has corresponding target set information.

[0081] In an embodiment of the present application, after each time the first selected video frame is determined, the first selected video frame and the corresponding target set information are specifically output together (that is, the first selected video frame in the form of a complete video image is output, and the target information in the form of text or graphic mark is output together), which can be specifically output to a preset storage unit for storage, so that further target analysis can be performed later based on the first selected video frame and the target set information. Furthermore, in order to avoid repeated output of information of the same target, in an embodiment of the present application, after the first selected video frame is selected, the information of the output target is removed from the target set of the first selected video frame to obtain the processed target set information. Specifically, the information of the output target that is removed is the information of the target existing in other first selected video frames that have been selected and output before the current first selected video frame.

[0082] Afterwards, the first selected video frame and the processed target set information are output together, and the target information output at this time is cached as the output target information, so that the repeated output of the target information can be avoided when other first selected video frames are output subsequently.

[0083] In the embodiment of the present application, after the first selected video frame is determined, the first selected video frame and the corresponding target set information can be output together, so that the target analysis can be accurately performed based on these output contents later. In addition, before output, the information of the output target can be removed from the target set information of the first selected video frame, and the processed target set information can be outputted, so that the repeated output of the target information can be avoided.

[0084] Optionally, in the above step B1 or C1, after determining the current candidate video frame as the second selected video frame, the method further includes:

[0085] Removing information of the third target from the target set information of the second selected video frame to obtain processed target set information; wherein the target set information of the second selected video frame includes information of each target in the second selected video frame; the third target is a target existing in both the second selected video frame and the current video frame, and the quality of the target in the current video frame is higher than the quality in the current candidate video frame;

[0086] Output the second selected video frame and the processed target set information.

[0087] In the embodiment of the present application, similarly, after the second selected video frame is determined, the second selected video frame and the corresponding target set information are output in a timely manner.

[0088] Specifically, the second selected video frame is the above-mentioned video frame in which there are targets that have disappeared or targets with higher quality than the current video frame. The second selected video frame also has corresponding target set information for describing the information of each target contained in the second selected video frame. Since it is determined that the second selected video frame timely selects targets that may not exist later or targets with reduced quality, when the second selected video frame is output, it is only necessary to output the information of the targets that need to be selected in time, and other targets can be retained for better output when the first selected video frame is subsequently output. Specifically, this part of the targets that can be retained and then output when the first selected video frame is subsequently output, that is, the targets that exist in both the second selected video frame and the current video frame and whose quality in the current video frame is higher than that in the second selected video frame, can be referred to as the third target for ease of description.

[0089] Specifically, the information of the third target is removed from the target set information of the second selected video frame, so as to obtain the processed target set information. Then, the second selected video frame and the processed target set information are output.

[0090] In the embodiment of the present application, after the second selected video frame is determined, the second selected target video frame and the corresponding target set information can be output in a timely manner, so that each target can be analyzed completely and comprehensively based on the output content later; and, because before output, the information of the third target that can be retained for subsequent higher quality output is specifically removed from the second selected video frame, the intelligence and accuracy of the target output are further improved.

[0091] In order to further demonstrate the beneficial effects of the video frame selection method of the embodiment of the present application, a specific scenario is used as an example below:

[0092] Assume that in the current scene, the preset period is 5 frames, that is, 5 frames are used as the period for selecting the best target. Assume that the frame numbers of the 5 frames in one preset period in the video are 1, 2, 3, 4, and 5, and these 5 frames all contain the 5 targets a, b, c, d, and e. The quality scores of these 5 targets in each frame are shown in Table 1:

[0093] Table 1:

[0094]

[0095] According to Table 1, if the traditional video frame selection method is used, the optimal video frames corresponding to each target will be selected according to the quality score of each target. Specifically, for target a, its quality score in the video frame with frame number 5 (hereinafter referred to as frame 5 for the sake of convenience) is the highest, so frame 5 is selected as the optimal video frame corresponding to target a; for target b, its quality score in the video frame with frame number 4 (hereinafter referred to as frame 4 for the sake of convenience) is the highest, so frame 4 is selected as the optimal video frame corresponding to target b; for target c, its quality score in the video frame with frame number 3 (hereinafter referred to as frame 3 for the sake of convenience) is the highest, so frame 3 is selected as the optimal video frame corresponding to target c; for target d, its quality score in the video frame with frame number 2 (hereinafter referred to as frame 2 for the sake of convenience) is the highest, so frame 2 is selected as the optimal video frame corresponding to target d; for target e, its quality score in the video frame with frame number 1 (hereinafter referred to as frame 1 for the sake of convenience) is the highest, so frame 1 is selected as the optimal video frame corresponding to target e. Therefore, in the end, using the traditional target optimization method, the five video frames 1-5 will be output as the selected optimal video frames. In this method, the average quality score of the target output is equal to the sum of the highest quality scores corresponding to each target divided by 5, that is: (0.5+0.8+0.7+0.5+0.6) / 5=0.62.

[0096] If the video frame selection method of the embodiment of the present application is used, the comprehensive quality score of frame 1 is calculated to be 0.47, the comprehensive quality score of frame 2 is 0.5, the comprehensive quality score of frame 3 is 0.43, the comprehensive quality score of frame 4 is 0.47, and the comprehensive quality score of frame 5 is 0.5 according to the above-mentioned comprehensive quality score calculation algorithm. Before acquiring frame 5, since frame 2 has the highest comprehensive quality score among frames 1-4, frame 2 is the candidate video frame at this time; and when frame 5 is acquired as the current video frame, since the comprehensive quality scores of frame 2 and frame 5 are equal, the lowest quality score of 0.2 in frame 2 can be further obtained and compared with the lowest quality score of 0.3 of frame 5. Since the lowest quality score of frame 5 is higher than the lowest quality score of frame 2, frame 5 is finally used as the updated candidate video frame. Afterwards, it is detected that the current preset period of 5 frames has arrived, that is, the latest candidate video frame at this time, frame 5, is selected as the optimal video frame within the preset period (i.e., the first selected video frame mentioned above). In this method, the average quality score of the target finally outputted is equal to the sum of the quality scores of the targets in frame 5 divided by 5, that is: (0.5+0.7+0.6+0.3+0.4) / 5=0.5.

[0097] It can be seen from the above that, through the video frame selection method of the embodiment of the present application, the output of video frames can be reduced by 400% while only reducing the average quality score by 0.12. Therefore, the number of selected video frames can be greatly reduced without greatly affecting the target quality, reducing the pressure of subsequent target secondary analysis and data storage, and improving the efficiency of subsequent target processing.

[0098] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0099] Embodiment 2:

[0100] Figure 2 A schematic diagram of the structure of a video frame selection device provided in an embodiment of the present application is shown. For the sake of convenience, only the part related to the embodiment of the present application is shown:

[0101] The video frame selection device comprises: an acquisition unit 21, a first comprehensive quality score determination unit 22, an update unit 23, and a selection unit 24. Among them:

[0102] The acquisition unit 21 is used to acquire the current video frame.

[0103] The first comprehensive quality score determination unit 22 is used to determine the first comprehensive quality score of the current video frame based on the quality of each of the first targets in the current video frame if the current video frame contains all the first targets; wherein the first target is a target existing in the current candidate video frame; and the candidate video frame has a corresponding pre-stored comprehensive quality score, and the pre-stored comprehensive quality score is a comprehensive quality score obtained based on the quality of each of the first targets in the candidate video frame.

[0104] The updating unit 23 is configured to update the candidate video frame and the corresponding pre-stored comprehensive quality score according to a comparison result between the first comprehensive quality score and the pre-stored comprehensive quality score.

[0105] The selection unit 24 is used to determine the latest candidate video frame as the first selected video frame if it is detected that the preset period has been reached; otherwise, the next frame of the current video frame is used as the latest current video frame, and return to execute the step of obtaining the current video frame and subsequent steps.

[0106] Optionally, if all the targets contained in the current video frame are the first target, the updating unit 23 is specifically used to use the current video frame as an updated candidate video frame and the first comprehensive quality score as an updated pre-stored comprehensive quality score if the first comprehensive quality score is greater than the pre-stored comprehensive quality score.

[0107] Optionally, if the current video frame includes, in addition to all first targets of the candidate video frame, a second target that does not exist in the candidate video frame, the updating unit 23 includes a candidate video frame updating module and a pre-stored comprehensive quality score updating module:

[0108] a candidate video frame updating module, configured to update the candidate video frame according to a comparison result between the first comprehensive quality score and the pre-stored comprehensive quality score;

[0109] The pre-stored comprehensive quality score updating module is used to determine a second comprehensive quality score of the current video frame based on the quality of each target contained in the current video frame, and use the second comprehensive quality score as the updated pre-stored comprehensive quality score.

[0110] Optionally, the candidate video frame update module is specifically used to discard the current candidate video frame and use the current video frame as the updated candidate video frame if the first comprehensive quality score is greater than or equal to the pre-stored comprehensive quality score; if the first comprehensive quality score is less than the pre-stored comprehensive quality score, determine the current candidate video frame as the second selected video frame and use the current video frame as the updated candidate video frame.

[0111] Optionally, the video frame selection device further includes:

[0112] a second selected video frame determining unit, configured to determine a current candidate video frame as a second selected video frame if the current video frame does not completely contain all of the first targets, and use the current video frame as an updated candidate video frame;

[0113] The second comprehensive quality score determining unit is used to determine a second comprehensive quality score of the current video frame based on the quality of each target included in the current video frame, and use the second comprehensive quality score as the updated pre-stored comprehensive quality score.

[0114] Optionally, the video frame selection device further includes:

[0115] A first target set information processing unit is used to remove information of output targets from the target set information of the first selected video frame to obtain processed target set information; wherein the information of output targets is information of targets existing in other first selected video frames before the first selected video frame;

[0116] The first output unit is used to output the first selected video frame and the processed target set information, and cache the information of each target in the processed target set information as the output target information.

[0117] Optionally, the video frame selection device further includes:

[0118] A second target set information processing unit is used to remove the information of the third target from the target set information of the second selected video frame to obtain processed target set information; wherein the target set information of the second selected video frame includes information of each target in the second selected video frame; the third target is a target that exists in both the second selected video frame and the current video frame, and the quality of the target in the current video frame is higher than the quality in the second selected video frame;

[0119] The second output unit is used to output the second selected video frame and the processed target set information.

[0120] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0121] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0122] Embodiment three:

[0123] Figure 3 is a schematic diagram of an electronic device provided by an embodiment of the present application. Figure 3 As shown, the electronic device 3 of this embodiment includes: a processor 30, a memory 31, and a computer program 32 stored in the memory 31 and executable on the processor 30, such as a video frame selection program. When the processor 30 executes the computer program 32, the steps in the above-mentioned video frame selection method embodiments are implemented, such as Figure 1 Alternatively, when the processor 30 executes the computer program 32, the functions of each module / unit in the above-mentioned device embodiments are realized, for example, Figure 2 The functions of units 21 to 24 are shown.

[0124] Exemplarily, the computer program 32 may be divided into one or more modules / units, which are stored in the memory 31 and executed by the processor 30 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 32 in the electronic device 3. For example, the computer program 32 may be divided into an acquisition unit, a first comprehensive quality score determination unit, an update unit, and a selection unit, and the specific functions of each unit are as follows:

[0125] The acquisition unit is used to acquire the current video frame.

[0126] A first comprehensive quality score determination unit is used to determine the first comprehensive quality score of the current video frame based on the quality of each of the first targets in the current video frame if the current video frame contains all the first targets; wherein the first target is a target existing in the current candidate video frame; and there is a corresponding pre-stored comprehensive quality score for the candidate video frame, and the pre-stored comprehensive quality score is a comprehensive quality score obtained based on the quality of each of the first targets in the candidate video frame.

[0127] An updating unit is used to update the candidate video frame and the corresponding pre-stored comprehensive quality score according to a comparison result between the first comprehensive quality score and the pre-stored comprehensive quality score.

[0128] The selection unit is used to determine the latest candidate video frame as the first selected video frame if it is detected that the preset period has been reached; otherwise, the next frame of the current video frame is used as the latest current video frame, and return to execute the step of obtaining the current video frame and subsequent steps.

[0129] The electronic device 3 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The electronic device may include, but is not limited to, a processor 30 and a memory 31. Those skilled in the art will appreciate that Figure 3 It is only an example of the electronic device 3 and does not constitute a limitation of the electronic device 3. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.

[0130] The processor 30 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0131] The memory 31 may be an internal storage unit of the electronic device 3, such as a hard disk or memory of the electronic device 3. The memory 31 may also be an external storage device of the electronic device 3, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 3. Further, the memory 31 may also include both an internal storage unit and an external storage device of the electronic device 3. The memory 31 is used to store the computer program and other programs and data required by the electronic device. The memory 31 may also be used to temporarily store data that has been output or is to be output.

[0132] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0133] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0134] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0135] In the embodiments provided in the present application, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0136] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0137] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0138] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0139] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A video frame selection method, characterized in that: include: Get the current video frame; If the current video frame contains all the first targets, determining a first comprehensive quality score of the current video frame based on the quality of each of the first targets in the current video frame; wherein the first target is a target existing in the current candidate video frame; the candidate video frame has a corresponding pre-stored comprehensive quality score, and the pre-stored comprehensive quality score is a comprehensive quality score obtained based on the quality of each of the first targets in the candidate video frame; updating the candidate video frame and the corresponding pre-stored comprehensive quality score according to a comparison result between the first comprehensive quality score and the pre-stored comprehensive quality score; If it is detected that the preset period has been reached, the latest candidate video frame is determined as the first selected video frame; otherwise, the next video frame of the current video frame is used as the latest current video frame, and the step of obtaining the current video frame and subsequent steps are returned to execute; Wherein, if the current video frame includes, in addition to all first targets of the candidate video frame, a second target that does not exist in the candidate video frame, then updating the candidate video frame and the corresponding pre-stored comprehensive quality score according to the comparison result of the first comprehensive quality score with the pre-stored comprehensive quality score includes: updating the candidate video frame according to a comparison result between the first comprehensive quality score and the pre-stored comprehensive quality score, wherein the updated candidate video frame is the current video frame; Based on the quality of each object included in the current video frame, a second comprehensive quality score of the current video frame is determined, and the second comprehensive quality score is used as the updated pre-stored comprehensive quality score.

2. The video frame selection method according to claim 1, characterized in that: If all the targets included in the current video frame are the first targets, updating the candidate video frame and the corresponding pre-stored comprehensive quality score according to the comparison result between the first comprehensive quality score and the pre-stored comprehensive quality score includes: If the first comprehensive quality score is greater than the pre-stored comprehensive quality score, the current video frame is used as an updated candidate video frame, and the first comprehensive quality score is used as an updated pre-stored comprehensive quality score.

3. The video frame selection method according to claim 1, characterized in that: The updating of the candidate video frame according to the comparison result between the first comprehensive quality score and the pre-stored comprehensive quality score includes: If the first comprehensive quality score is greater than or equal to the pre-stored comprehensive quality score, discarding the current candidate video frame and using the current video frame as an updated candidate video frame; If the first comprehensive quality score is less than the pre-stored comprehensive quality score, the current candidate video frame is determined as the second selected video frame, and the current video frame is used as the updated candidate video frame.

4. The video frame selection method according to claim 1, characterized in that: After obtaining the current video frame, the method further includes: If the current video frame does not completely contain all of the first targets, determining the current candidate video frame as the second selected video frame, and using the current video frame as an updated candidate video frame; Based on the quality of each object included in the current video frame, a second comprehensive quality score of the current video frame is determined, and the second comprehensive quality score is used as the updated pre-stored comprehensive quality score.

5. The video frame selection method according to any one of claims 1 to 4, characterized in that: After determining the latest candidate video frame as the first selected video frame, the method further includes: Removing information of outputted targets from target set information of the first selected video frame to obtain processed target set information; wherein the information of outputted targets is information of targets existing in other first selected video frames before the first selected video frame; The first selected video frame and the processed target set information are output, and information of each target in the processed target set information is cached as information of the outputted target.

6. The video frame selection method according to claim 3 or 4, characterized in that: After the current candidate video frame is determined as the second selected video frame, the method further includes: Removing information of the third target from the target set information of the second selected video frame to obtain processed target set information; wherein the target set information of the second selected video frame includes information of each target in the second selected video frame; the third target is a target existing in both the second selected video frame and the current video frame, and the quality of the target in the current video frame is higher than that in the second selected video frame; Output the second selected video frame and the processed target set information.

7. A video frame selection device, characterized in that: include: An acquisition unit, used for acquiring a current video frame; A first comprehensive quality score determination unit is configured to determine a first comprehensive quality score of the current video frame based on the quality of each of the first targets in the current video frame if the current video frame contains all the first targets; wherein the first targets are targets existing in the current candidate video frame; the candidate video frame has a corresponding pre-stored comprehensive quality score, and the pre-stored comprehensive quality score is a comprehensive quality score obtained based on the quality of each of the first targets in the candidate video frame; an updating unit, configured to update the candidate video frame and the corresponding pre-stored comprehensive quality score according to a comparison result between the first comprehensive quality score and the pre-stored comprehensive quality score; A selection unit, configured to determine the latest candidate video frame as the first selected video frame if it is detected that the preset period has been reached; otherwise, determine the next video frame of the current video frame as the latest current video frame, and return to execute the step of obtaining the current video frame and subsequent steps; Wherein, if the current video frame includes, in addition to all the first targets of the candidate video frame, a second target that does not exist in the candidate video frame, the updating unit includes: a candidate video frame updating module, configured to update the candidate video frame according to a comparison result between the first comprehensive quality score and the pre-stored comprehensive quality score, wherein the updated candidate video frame is the current video frame; The pre-stored comprehensive quality score updating module is used to determine a second comprehensive quality score of the current video frame based on the quality of each target contained in the current video frame, and use the second comprehensive quality score as the updated pre-stored comprehensive quality score.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the electronic device implements the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the electronic device implements the steps of the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Video frame extraction method and device and terminal equipment

    CN110263741A

  • Apparatus and method for providing a sequence of video frames Apparatus and method for providing a scene model Apparatus and method for creating a scene model, menu structure and computer program

    JP2009529736A