CN114363659A - Method, device, equipment and storage medium for reducing video flicker - Google Patents
Method, device, equipment and storage medium for reducing video flicker Download PDFInfo
- Publication number
- CN114363659A CN114363659A CN202111531311.7A CN202111531311A CN114363659A CN 114363659 A CN114363659 A CN 114363659A CN 202111531311 A CN202111531311 A CN 202111531311A CN 114363659 A CN114363659 A CN 114363659A
- Authority
- CN
- China
- Prior art keywords
- reference value
- file
- frame
- comparison
- comparison reference
- 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 60
- 230000002194 synthesizing effect Effects 0.000 claims abstract description 10
- 230000000052 comparative effect Effects 0.000 claims abstract description 7
- 238000004364 calculation method Methods 0.000 claims description 16
- 238000009432 framing Methods 0.000 claims description 16
- 230000011218 segmentation Effects 0.000 claims description 16
- 238000012935 Averaging Methods 0.000 claims description 10
- 230000000694 effects Effects 0.000 description 6
- 230000009286 beneficial effect Effects 0.000 description 3
- 230000015572 biosynthetic process Effects 0.000 description 3
- 238000003786 synthesis reaction Methods 0.000 description 3
- 238000001514 detection method Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 238000003062 neural network model Methods 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 238000013139 quantization Methods 0.000 description 1
Images
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)
- Picture Signal Circuits (AREA)
Abstract
The invention discloses a method, a device, equipment and a storage medium for reducing video flicker, belonging to the field of video processing, wherein the method for reducing video flicker can acquire an image file of original video data; wherein the image file includes all of the image frames; bringing the image files into a set to be processed; a comparative reference value generation step: calculating a comparison reference value between every two connected image frames in the image file; comparing a preset comparison threshold value with a comparison reference value, and updating a set to be processed or returning to the comparison reference value generation step; and synthesizing the updated image files in the set to be processed to obtain the target video, so that the video flicker is reduced simply and efficiently.
Description
Technical Field
The present invention relates to the field of video processing, and in particular, to a method, an apparatus, a device, and a storage medium for reducing video flicker.
Background
At present, related neural network models are often adopted to process videos, but the method is high in cost and cannot guarantee efficiency. Therefore, how to provide a simple and efficient method for reducing video flicker becomes a problem to be solved urgently.
Disclosure of Invention
The present invention is directed to solving at least one of the problems of the prior art. Therefore, the invention provides a method for reducing video flicker, which can simply and efficiently reduce video flicker.
The invention also provides a device for reducing video flicker, which has the method for reducing video flicker.
The invention also provides equipment for reducing the video flicker, which is provided with the device for reducing the video flicker.
The invention also provides a computer readable storage medium.
The method for reducing video flicker according to the embodiment of the first aspect of the invention comprises the following steps:
acquiring an image file of the original video data; wherein the image file comprises all image frames;
bringing the image file into a set to be processed;
a comparative reference value generation step: calculating a comparison reference value between every two connected image frames in the image file;
comparing a preset comparison threshold value with the comparison reference value, and updating the to-be-processed set or returning to the comparison reference value generation step;
and synthesizing the updated image files in the set to be processed to obtain a target video.
The method for reducing the video flicker according to the embodiment of the invention has at least the following beneficial effects: the method for reducing the video flicker can disassemble the acquired original video data to obtain an image file comprising all the image frames, and brings the image file into a set to be processed; by executing the step of generating the comparison reference value, the invention can quantize the image difference between every two connected image frames in the image file, obtain the comparison reference value which can represent the difference degree between every two connected image frames in all the image frames in the image file, and take the comparison reference value as the reference standard for measuring the difference degree between the two image frames; by comparing the preset comparison and value with the comparison reference value, the method can judge whether a large difference exists between every two connected image frames, and update the set to be processed or re-execute the comparison reference value generation step according to the comparison result; the method can also carry out synthesis processing on the image files in the updated to-be-processed set when the to-be-processed set is detected to be updated, so that the target video with reduced flicker is obtained. According to the method, original video data are split, and the difference between every two connected image frames is compared pair by pair, so that the image frames with larger difference are updated to generate the target video with reduced flicker, and the efficiency of reducing video flicker is effectively improved.
According to some embodiments of the invention, the obtaining the image file of the original video data comprises:
acquiring the original video data;
performing framing processing on the original video data to obtain an original frame file;
according to some embodiments of the invention, the comparison reference value generating step: calculating a comparison reference value between every two consecutive image frames in the image file, including:
acquiring a first average value, a first standard deviation and a first covariance of the first frame file;
acquiring a second average value, a second standard deviation and a second covariance of the second frame file;
and according to a preset first constant and a preset second constant, carrying out SSIM value calculation on the first average value, the first standard deviation, the first covariance, the second average value, the second standard deviation and the second covariance to obtain the comparison reference value.
According to some embodiments of the present invention, the comparing a preset comparison threshold with the comparison reference value, and updating the to-be-processed set or returning to the comparison reference value generating step includes:
comparing a preset comparison threshold value with the comparison reference value;
if the comparison reference value is greater than or equal to the comparison threshold value, obtaining a first frame file and a second frame file according to the time sequence of two continuous image frames corresponding to the comparison reference value;
obtaining a second updating frame according to the first frame file, the second frame file and a preset average algorithm;
and replacing the second frame file in the set to be processed with the second updating frame to update the set to be processed.
Alternatively, the first and second electrodes may be,
and if the comparison reference value is smaller than the comparison threshold value, not updating the to-be-processed set, and returning to the comparison reference value generation step.
According to some embodiments of the present invention, the obtaining a second update frame according to the first frame file, the second frame file and a preset averaging algorithm includes:
averaging the first frame file and the second frame file to obtain an updated average value;
and updating the average value of the second frame file according to the updated average value to obtain the second updated frame.
An apparatus for reducing video flicker according to a second aspect of the present invention comprises:
the splitting module is used for acquiring an image file of the video data; wherein the image file comprises all image frames;
the collection module is used for bringing the image files into a set to be processed;
a calculation module for performing the comparative reference value generation step: calculating a comparison reference value between every two connected image frames in the image file;
the comparison module is used for comparing a preset comparison threshold value with the comparison reference value and updating the to-be-processed set or returning to the comparison reference value generation step;
and the output module is used for synthesizing the updated image files in the set to be processed to obtain the target video.
The device for reducing video flicker according to the embodiment of the invention has at least the following beneficial effects: the device for reducing video flicker comprises a splitting module, a collecting module, a calculating module, a comparing module and an output module. The splitting module is used for splitting the acquired data video into image files comprising all image frames; the collection module may generate a to-be-processed set for performing flicker reduction processing, and bring a current image file into the to-be-processed set; the calculation module may perform the comparison reference value generation step provided in the embodiment according to the first aspect of the present invention to achieve calculation of the comparison reference value between two consecutive image frames in the generated image file; the comparison module can acquire a preset comparison threshold value, compare the comparison reference value with the comparison threshold value, so as to provide a quantitative index of the difference degree between the image frames, and update the image files in the set to be processed according to the comparison result or re-execute the comparison reference value generation step; the output module can acquire the to-be-processed set updated by the comparison module and synthesize the image files in the to-be-processed set, so that an output video with reduced flicker is obtained. The device judges the position of the video image with flicker in the video by detecting the image difference between frames in the original video data, and processes the image frames before and after the flicker, thereby reducing the difference between the image frames, updating the image frames with larger difference to generate the target video with reduced flicker, and effectively improving the efficiency of reducing video flicker.
According to some embodiments of the invention, the splitting module comprises:
an acquisition unit configured to acquire the video data;
the framing unit is used for framing the video data to obtain an original frame file;
and the generating unit is used for carrying out segmentation processing on the original frame file through a preset segmentation model to obtain the image file.
According to some embodiments of the invention, the comparison module comprises:
the comparison unit is used for comparing a preset comparison threshold value with the comparison reference value;
the first processing unit is used for obtaining a first frame file and a second frame file according to the time sequence of two continuous image frames corresponding to the comparison reference value if the comparison reference value is greater than or equal to the comparison threshold value;
the first updating unit is used for obtaining a second updating frame according to the first frame file, the second frame file and a preset average algorithm;
the second processing unit is used for replacing a second frame file in the set to be processed with the second updating frame so as to update the set to be processed;
alternatively, the first and second electrodes may be,
and the second comparison unit is used for not updating the to-be-processed set if the comparison reference value is smaller than the comparison threshold value, and returning to the comparison reference value generation step.
According to a third aspect of the present invention, there is provided an apparatus for reducing video flicker, comprising:
at least one memory, and
a processor communicatively coupled to the at least one memory, wherein
The memory stores instructions that can be executed by the at least one processor, so that the at least one processor, when executing the instructions, can implement the method for reducing video flicker according to the embodiment of the first aspect of the present invention.
The device for reducing video flicker according to the embodiment of the invention has at least the following beneficial effects: the device for reducing video flicker comprises a processor and at least one memory. The processor can execute instructions stored in the memory, so that the obtained original video data are disassembled to obtain an image file comprising all image frames, and the image file is brought into a set to be processed; by executing the step of generating the comparison reference value, the invention can quantize the image difference between every two connected image frames in the image file, obtain the comparison reference value which can represent the difference degree between every two connected image frames in all the image frames in the image file, and take the comparison reference value as the reference standard for measuring the difference degree between the two image frames; whether a large difference exists between every two connected image frames can be judged by comparing a preset comparison and value with a comparison reference value, and a to-be-processed set is updated or the comparison reference value generation step is executed again according to the comparison result; and when detecting that the to-be-processed set is updated, synthesizing the image files in the updated to-be-processed set, so as to obtain the target video with reduced flicker. By splitting the original video data and comparing the difference between every two connected image frames pair by pair, the image frames with larger difference are updated to generate the target video with reduced flicker, and the efficiency of reducing video flicker is effectively improved.
According to the fourth aspect of the present invention, there is provided a computer-readable storage medium, in which computer-executable instructions are stored, and a computer can implement the method for reducing video flicker according to the embodiment of the first aspect of the present invention by executing the computer-executable instructions.
The computer-readable storage medium according to the embodiment of the invention has at least the following advantages: the computer and the executable instructions stored in the computer-readable storage medium provided by the invention can be executed by the computer, so that the obtained original video data are disassembled by the computer to obtain image files of all image frames, and the image files are brought into a set to be processed; by executing the step of generating the comparison reference value, the invention can quantize the image difference between every two connected image frames in the image file, obtain the comparison reference value which can represent the difference degree between every two connected image frames in all the image frames in the image file, and take the comparison reference value as the reference standard for measuring the difference degree between the two image frames; whether a large difference exists between every two connected image frames can be judged by comparing a preset comparison and value with a comparison reference value, and a to-be-processed set is updated or the comparison reference value generation step is executed again according to the comparison result; and when detecting that the to-be-processed set is updated, synthesizing the image files in the updated to-be-processed set, so as to obtain the target video with reduced flicker. By splitting the original video data and comparing the difference between every two connected image frames pair by pair, the image frames with larger difference are updated to generate the target video with reduced flicker, and the efficiency of reducing video flicker is effectively improved.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The invention is further described with reference to the following figures and examples, in which:
FIG. 1 is a flow chart of a method for reducing video flicker in accordance with the present invention;
fig. 2 is a detailed flowchart of step S100 in fig. 1.
Fig. 3 is a detailed flowchart of step S300 in fig. 1.
Fig. 4 is a detailed flowchart of step S400 in fig. 1.
Fig. 5 is a detailed flowchart of step S430 in fig. 4.
FIG. 6 is a schematic structural diagram of an apparatus for reducing video flicker according to the present invention.
Reference numerals: 100. splitting the module; 200. a collection module; 300. a calculation module; 400. a comparison module; 500. and an output module.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention, and are not to be construed as limiting the present invention.
In the description of the present invention, it should be understood that the orientation or positional relationship referred to in the description of the orientation, such as the upper, lower, front, rear, left, right, etc., is based on the orientation or positional relationship shown in the drawings, and is only for convenience of description and simplification of description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus, should not be construed as limiting the present invention.
In the description of the present invention, the meaning of a plurality is one or more, the meaning of a plurality is two or more, and the above, below, exceeding, etc. are understood as excluding the present numbers, and the above, below, within, etc. are understood as including the present numbers. If the first and second are described for the purpose of distinguishing technical features, they are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated or implicitly indicating the precedence of the technical features indicated.
In the description of the present invention, unless otherwise explicitly limited, terms such as arrangement, installation, connection and the like should be understood in a broad sense, and those skilled in the art can reasonably determine the specific meanings of the above terms in the present invention in combination with the specific contents of the technical solutions.
In the description of the present invention, reference to the description of the terms "one embodiment," "some embodiments," "an illustrative embodiment," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
In a first aspect, referring to fig. 1, the present invention provides a method for reducing video flicker, comprising:
s100, acquiring an image file of original video data; wherein the image file includes all of the image frames;
s200, bringing the image files into a set to be processed;
s300, a comparative reference value generation step: calculating a comparison reference value between every two connected image frames in the image file;
s400, comparing a preset comparison threshold value with a comparison reference value, and updating a set to be processed or returning to the comparison reference value generation step;
and S500, synthesizing the updated image files in the set to be processed to obtain the target video.
The method for reducing the video flicker can disassemble the acquired original video data to obtain an image file comprising all the image frames, and brings the image file into a set to be processed; by executing the step of generating the comparison reference value, the invention can quantize the image difference between every two connected image frames in the image file, obtain the comparison reference value which can represent the difference degree between every two connected image frames in all the image frames in the image file, and take the comparison reference value as the reference standard for measuring the difference degree between the two image frames; by comparing the preset comparison and value with the comparison reference value, the method can judge whether a large difference exists between every two connected image frames, and update the set to be processed or re-execute the comparison reference value generation step according to the comparison result; the method can also carry out synthesis processing on the image files in the updated to-be-processed set when the to-be-processed set is detected to be updated, so that the target video with reduced flicker is obtained. According to the method, original video data are split, and the difference between every two connected image frames is compared pair by pair, so that the image frames with larger difference are updated to generate the target video with reduced flicker, and the efficiency of reducing video flicker is effectively improved.
Referring to fig. 2, in some embodiments, step S100 includes:
s110, acquiring original video data;
and S120, performing framing processing on the original video data to obtain an original frame file.
S130, segmenting the original frame file through a preset segmentation model to obtain an image file.
The method for reducing the video flicker provided by the invention can obtain the original video data required to be processed by a user, perform framing processing on the video data to obtain the original frame file, and perform segmentation processing on the original frame file one by one through the preset segmentation model to obtain the minimum unit required to be processed in the process of reducing the video flicker by the method, namely, all the image frames are obtained through the processing of the segmentation model, and the image file is obtained according to all the image frames. By the method, each minimum unit in the original video data can be divided, so that a processing method for reducing the flicker of the video by processing each minimum unit, namely the image frame is provided. Because only the averaging calculation is needed to be carried out on each image frame in the processing process, the method can avoid the expenditure in the aspects of extra time, money and the like caused by the adoption of the traditional segmentation algorithm which needs a large amount of data sets for calculation, and the like, thereby simply and efficiently realizing the effect of reducing the flicker of the video.
In some specific embodiments, the present invention may divide the original video data into several pictures through a framing process, and use the several pictures as the original frame file. The number of the pictures after the framing processing is specifically customized according to the user requirements, and is not limited. The invention can also divide the example in each picture in the original frame file by the division model, wherein the selection of the example is also specified by the user without limitation. For example, in some other embodiments, a user selects a portrait in original video data, the present invention may divide the original video data into a plurality of pictures through frame division processing to obtain an original frame file, and process the original frame file through a division model to obtain all image frames including portrait information in each picture, so as to obtain an image file corresponding to all portrait information in user requirements.
Referring to fig. 3, in some embodiments, step S300 includes:
s310, acquiring a first average value, a first standard deviation and a first covariance of a first frame file;
s320, acquiring a second average value, a second standard deviation and a second covariance of a second frame file;
s330, according to a preset first constant and a preset second constant, SSIM value calculation is carried out on the first average value, the first standard deviation, the first covariance, the second average value, the second standard deviation and the second covariance to obtain a comparison reference value.
According to the method, every two connected image frames in an image file can be grouped, the two image frames in each group are divided into a first frame file and a second frame file according to a time sequence, a first average value, a first standard deviation and a first covariance of the first frame file are obtained from the first frame file, a second average value, a second standard deviation and a second covariance of the second frame file are obtained, and SSIM value calculation is carried out on the first average value, the first standard deviation, the first covariance, the second average value, the second standard deviation and the second covariance according to a preset first constant and a preset second constant to obtain a comparison reference value. By the method, the difference degree between the image frames can be distinguished by taking the comparison reference value corresponding to the SSIM value as a quantization index, so that the image frames are optimized according to the difference degree to realize the processing of reducing the flicker of the original video data. The SSIM value is calculated by an algorithm consistent with the image processing field, which is not described herein.
In some specific embodiments, when grouping every two consecutive image frames, in order to ensure the efficiency of reducing video flicker, the first image frame in each group is not identical to the second image frame in the previous group, i.e. the adjacent image frames in the group do not overlap. By the method, the invention can effectively reduce the group number of the grouped image frames, thereby improving the efficiency of reducing the video flicker.
Referring to fig. 4, in some embodiments, step S400 includes:
s410, comparing a preset comparison threshold value with a comparison reference value;
s420, if the comparison reference value is greater than or equal to the comparison threshold value, obtaining a first frame file and a second frame file according to the time sequence of two continuous image frames corresponding to the comparison reference value;
s430, obtaining a second updating frame according to the first frame file, the second frame file and a preset average algorithm;
s440, replacing the second frame file in the set to be processed with a second updating frame so as to update the set to be processed.
Alternatively, the first and second electrodes may be,
s450, if the comparison reference value is smaller than the comparison threshold value, the set to be processed is not updated, and the step of generating the comparison reference value is returned.
The method can process the set to be processed by comparing the preset comparison threshold value with the comparison reference value. Specifically, the method comprises the steps of firstly comparing a comparison threshold value with a comparison reference value, when the comparison reference value is larger than or equal to the comparison threshold value, dividing according to a time sequence to obtain a first frame file and a second frame file corresponding to the comparison reference value, updating the second frame file according to an averaging algorithm, the first frame file and the second frame file to obtain a second updating frame, and using the second updating frame as a new second frame file to replace the original second frame file, so that the updated first frame file and the new second frame file are updated to a set to be processed; or after the comparison threshold and the comparison reference value are compared by the method, when the comparison reference value is detected to be smaller than the comparison threshold, skipping the image frame in the group corresponding to the comparison reference value, keeping the image file in the to-be-processed set unchanged, and re-executing the comparison reference value generation step to generate the comparison reference value between two continuous image frames in the next group, so as to realize whether the image frame in the next group needs to be updated as in steps S410 to S450 until the detection of the image frames in all the groups is finished, and obtain the final to-be-processed set. By the method, the difference between the second image frame and the first image frame can be judged by comparing the threshold values, and the second image frame is updated, so that the effect of reducing video flicker is effectively realized.
In some specific embodiments, the comparison threshold may be 0.7, and in some embodiments, may be other, without limitation.
Referring to fig. 5, in some embodiments, step S430 includes:
s431, averaging the first frame file and the second frame file to obtain an updated average value;
and S432, updating the average value of the second frame file according to the updated average value to obtain a second updated frame.
The method can obtain the average values corresponding to the first frame file and the second frame file respectively according to the first frame file and the second frame file, and carry out averaging processing on the average value of the first frame file and the average value of the second frame file to obtain an updated average value; in some specific embodiments, the averaging process may be performed by calculating an arithmetic average of the first frame file and the average of the second frame file. The method can realize the updating of the second frame file by assigning the updating average value to the average value of the original second frame file, thereby obtaining a second updating frame. The method simply and quickly realizes the similarity processing between the image frames with overlarge difference, thereby simply and efficiently realizing the process of reducing the video flicker.
It should be noted that, in the method for reducing video flicker provided by the present invention, in order to improve the processing efficiency of reducing video flicker, in step S300, a comparison reference value between every two consecutive image frames in the image file is calculated, so as to compare the difference between every two consecutive image frames, and the effect of reducing flicker in the video is achieved by using two image frames as a group.
In a second aspect, referring to fig. 6, the present aspect provides an apparatus for reducing video flicker, comprising:
a splitting module 100, configured to obtain an image file of video data; wherein the image file includes all of the image frames;
a collection module 200, configured to bring the image file into a set to be processed;
a calculation module 300 for performing the comparative reference value generation step: calculating a comparison reference value between every two connected image frames in the image file;
a comparison module 400, configured to compare a preset comparison threshold with a comparison reference value, and update the to-be-processed set or return to the comparison reference value generation step;
and the output module 500 is configured to perform synthesis processing on the updated image files in the set to be processed to obtain a target video.
The device for reducing video flicker provided by the invention comprises a splitting module 100, a collecting module 200, a calculating module 300, a comparing module 400 and an output module 500. The splitting module 100 is configured to split an acquired data video into image files including all image frames; the collection module 200 may generate a to-be-processed set for performing flicker reduction processing, and bring the current image file into the to-be-processed set; the calculation module 300 may perform the comparison reference value generation step provided in the embodiment according to the first aspect of the present invention to realize calculation of the comparison reference value between two consecutive image frames in the generated image file; the comparison module 400 may obtain a preset comparison threshold, compare the comparison reference value with the comparison threshold, thereby providing a quantitative index of the degree of difference between the image frames, and update the image files in the to-be-processed set or re-execute the comparison reference value generation step according to the comparison result; the output module 500 may obtain the to-be-processed set updated by the comparison module 400, and synthesize the image files in the to-be-processed set, so as to obtain an output video with reduced flicker. The device judges the position of the video image with flicker in the video by detecting the image difference between frames in the original video data, and processes the image frames before and after the flicker, thereby reducing the difference between the image frames, updating the image frames with larger difference to generate the target video with reduced flicker, and effectively improving the efficiency of reducing video flicker.
In some embodiments, the splitting module 100 includes:
an acquisition unit configured to acquire video data;
the framing unit is used for framing the video data to obtain an original frame file;
and the generating unit is used for carrying out segmentation processing on the original frame file through a preset segmentation model to obtain an image file.
The splitting module 100 provided by the present invention includes an obtaining unit, a framing unit and a generating unit. The acquisition unit can acquire original video data required to be processed by a user, the video data is subjected to framing processing through the framing unit to obtain an original frame file, a segmentation model is preset in the generation unit, the generation unit can perform segmentation processing on the original frame file one by one through the segmentation model to obtain a minimum unit required to be processed in the process of reducing video flicker of the device, namely all image frames are obtained through the processing of the framing model, and an image file is obtained according to all the image frames. By the device, each minimum unit in the original video data can be divided, so that the technical effect of reducing the flicker of the video by processing each minimum unit, namely processing the image frame is achieved. Because only the averaging calculation is needed to be carried out on each image frame in the processing process, the device can avoid the expenditure in the aspects of extra time, money and the like caused by the adoption of the traditional segmentation algorithm which needs a large amount of data sets for calculation, and the like, thereby simply and efficiently realizing the effect of reducing the flicker of the video.
In some embodiments, the tagging module comprises:
the comparison unit is used for comparing a preset comparison threshold value with a comparison reference value;
the first processing unit is used for obtaining a first frame file and a second frame file according to the time sequence of two continuous image frames corresponding to the comparison reference value if the comparison reference value is greater than or equal to the comparison threshold value;
the first updating unit is used for obtaining a second updating frame according to the first frame file, the second frame file and a preset average algorithm;
the second updating unit is used for replacing a second frame file in the set to be processed with a second updating frame so as to update the set to be processed;
alternatively, the first and second electrodes may be,
and the second processing unit is used for not updating the to-be-processed set if the comparison reference value is smaller than the comparison threshold value, and returning to the comparison reference value generation step.
The device can compare the comparison threshold value with the comparison reference value through the comparison unit, and when the comparison reference value is greater than or equal to the comparison threshold value, the first processing unit is controlled to divide the comparison reference value according to the time sequence to obtain a first frame file and a second frame file corresponding to the comparison reference value, the first updating unit is controlled to update the second frame file according to a preset average algorithm, the first frame file and the second frame file to obtain a second updating frame, and the second updating unit 440 is controlled to take the second updating frame as a new second frame file to replace the original second frame file, so that the updated first frame file and the new second frame file are updated to a set to be processed; or after the comparison module in the present apparatus compares the comparison threshold with the comparison reference value, the second processing unit 450 is controlled to skip the image frame in the group corresponding to the comparison reference value when the comparison reference value is smaller than the comparison threshold, and keep the image file in the to-be-processed set unchanged, and re-execute the comparison reference value generation step to generate the comparison reference value between two consecutive image frames in the next group, thereby implementing whether the image frame in the next group needs to update the second frame file corresponding to the comparison reference value in the next group until the detection of the image frames in all the groups is finished, and obtaining the final to-be-processed set. By the device, the difference between the second image frame and the first image frame can be judged by comparing the threshold value, and the second image frame is updated, so that the effect of reducing video flicker is effectively realized.
In a third aspect, the present invention provides an apparatus for reducing video flicker, comprising:
at least one memory, and
a processor communicatively coupled to at least one memory, wherein
The memory has stored therein instructions executable by the at least one processor to cause the at least one processor to perform the method for reducing video flicker as embodied in the first aspect of the present invention.
The device for reducing video flicker comprises a processor and at least one memory. The processor can execute instructions stored in the memory, so that the obtained original video data are disassembled to obtain an image file comprising all image frames, and the image file is brought into a set to be processed; by executing the step of generating the comparison reference value, the invention can quantize the image difference between every two connected image frames in the image file, obtain the comparison reference value which can represent the difference degree between every two connected image frames in all the image frames in the image file, and take the comparison reference value as the reference standard for measuring the difference degree between the two image frames; whether a large difference exists between every two connected image frames can be judged by comparing a preset comparison and value with a comparison reference value, and a to-be-processed set is updated or the comparison reference value generation step is executed again according to the comparison result; and when detecting that the to-be-processed set is updated, synthesizing the image files in the updated to-be-processed set, so as to obtain the target video with reduced flicker. By splitting the original video data and comparing the difference between every two connected image frames pair by pair, the image frames with larger difference are updated to generate the target video with reduced flicker, and the efficiency of reducing video flicker is effectively improved.
In a fourth aspect, the present invention provides a computer-readable storage medium, in which computer-executable instructions are stored, and a computer can implement the method for reducing video flicker according to the embodiment of the first aspect of the present invention by executing the computer-executable instructions.
The computer and the executable instructions stored in the computer-readable storage medium provided by the invention can be executed by the computer, so that the obtained original video data are disassembled by the computer to obtain image files of all image frames, and the image files are brought into a set to be processed; by executing the step of generating the comparison reference value, the invention can quantize the image difference between every two connected image frames in the image file, obtain the comparison reference value which can represent the difference degree between every two connected image frames in all the image frames in the image file, and take the comparison reference value as the reference standard for measuring the difference degree between the two image frames; whether a large difference exists between every two connected image frames can be judged by comparing a preset comparison and value with a comparison reference value, and a to-be-processed set is updated or the comparison reference value generation step is executed again according to the comparison result; and when detecting that the to-be-processed set is updated, synthesizing the image files in the updated to-be-processed set, so as to obtain the target video with reduced flicker. According to the method, original video data are split, and the difference between every two connected image frames is compared pair by pair, so that the image frames with larger difference are updated to generate the target video with reduced flicker, and the efficiency of reducing video flicker is effectively improved.
The embodiments of the present invention have been described in detail with reference to the accompanying drawings, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge of those skilled in the art without departing from the gist of the present invention. Furthermore, the embodiments of the present invention and the features of the embodiments may be combined with each other without conflict.
Claims (10)
1. A method for reducing video flicker, comprising:
acquiring an image file of original video data; wherein the image file comprises all image frames;
bringing the image file into a set to be processed;
a comparative reference value generation step: calculating a comparison reference value between every two connected image frames in the image file;
comparing a preset comparison threshold value with the comparison reference value, and updating the to-be-processed set or returning to the comparison reference value generation step;
and synthesizing the updated image files in the set to be processed to obtain a target video.
2. The method of claim 1, wherein the obtaining the image file of the original video data comprises:
acquiring the original video data;
performing framing processing on the original video data to obtain an original frame file;
and segmenting the original frame file through a preset segmentation model to obtain the image file.
3. The method of reducing video flicker according to claim 2, wherein said comparing reference value generating step: calculating a comparison reference value between every two consecutive image frames in the image file, including:
acquiring a first average value, a first standard deviation and a first covariance of a first frame file;
acquiring a second average value, a second standard deviation and a second covariance of a second frame file;
and according to a preset first constant and a preset second constant, carrying out SSIM value calculation on the first average value, the first standard deviation, the first covariance, the second average value, the second standard deviation and the second covariance to obtain the comparison reference value.
4. The method for reducing video flicker according to claim 2, wherein said comparing the preset comparison threshold with the comparison reference value and updating the to-be-processed set or returning to the comparison reference value generating step comprises:
comparing a preset comparison threshold value with the comparison reference value;
if the comparison reference value is greater than or equal to the comparison threshold value, obtaining a first frame file and a second frame file according to the time sequence of two continuous image frames corresponding to the comparison reference value;
obtaining a second updating frame according to the first frame file, the second frame file and a preset average algorithm;
replacing a second frame file in the set to be processed with the second updating frame to update the set to be processed;
alternatively, the first and second electrodes may be,
and if the comparison reference value is smaller than the comparison threshold value, not updating the to-be-processed set, and returning to the comparison reference value generation step.
5. The method of claim 4, wherein obtaining a second updated frame according to the first frame file, the second frame file and a preset averaging algorithm comprises:
averaging the first frame file and the second frame file to obtain an updated average value;
and updating the average value of the second frame file according to the updated average value to obtain the second updated frame.
6. An apparatus for reducing video flicker, comprising:
the splitting module is used for acquiring an image file of the video data; wherein the image file comprises all image frames;
the collection module is used for bringing the image files into a set to be processed;
a calculation module for performing the comparative reference value generation step: calculating a comparison reference value between every two connected image frames in the image file;
the comparison module is used for comparing a preset comparison threshold value with the comparison reference value and updating the to-be-processed set or returning to the comparison reference value generation step;
and the output module is used for synthesizing the updated image files in the set to be processed to obtain the target video.
7. The apparatus for reducing video flicker according to claim 6, wherein said splitting module comprises:
an acquisition unit configured to acquire the video data;
the framing unit is used for framing the video data to obtain an original frame file;
and the generating unit is used for carrying out segmentation processing on the original frame file through a preset segmentation model to obtain the image file.
8. The apparatus for reducing video flicker according to claim 6, wherein said comparing module comprises:
the comparison unit is used for comparing a preset comparison threshold value with the comparison reference value;
the first processing unit is used for obtaining a first frame file and a second frame file according to the time sequence of two continuous image frames corresponding to the comparison reference value if the comparison reference value is greater than or equal to the comparison threshold value;
the first updating unit is used for obtaining a second updating frame according to the first frame file, the second frame file and a preset average algorithm;
a second updating unit, configured to replace a second frame file in the to-be-processed set with the second updating frame, so as to update the to-be-processed set;
alternatively, the first and second electrodes may be,
and the second processing unit is used for not updating the to-be-processed set if the comparison reference value is smaller than the comparison threshold value, and returning to the comparison reference value generation step.
9. Apparatus for reducing video flicker, comprising:
at least one memory, and,
a processor communicatively coupled to the at least one memory, wherein,
the memory has stored therein instructions executable by the at least one processor to cause the at least one processor to implement the method of reducing video flicker as claimed in any one of claims 1 to 5 when executing the instructions.
10. Computer-readable storage media, wherein computer-executable instructions are stored in the computer-readable storage media, and a computer can implement the method for reducing video flicker according to any one of claims 1 to 5 by executing the computer-executable instructions.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111531311.7A CN114363659A (en) | 2021-12-15 | 2021-12-15 | Method, device, equipment and storage medium for reducing video flicker |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111531311.7A CN114363659A (en) | 2021-12-15 | 2021-12-15 | Method, device, equipment and storage medium for reducing video flicker |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114363659A true CN114363659A (en) | 2022-04-15 |
Family
ID=81099077
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111531311.7A Pending CN114363659A (en) | 2021-12-15 | 2021-12-15 | Method, device, equipment and storage medium for reducing video flicker |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114363659A (en) |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050018920A1 (en) * | 2003-07-22 | 2005-01-27 | Warner Bros. Entertainment Inc. | Method and apparatus for flicker removal from an image sequence |
CN102006423A (en) * | 2010-11-15 | 2011-04-06 | 无锡中星微电子有限公司 | Camera and method and device for eliminating flicker phenomenon of same |
CN109063694A (en) * | 2018-09-12 | 2018-12-21 | 北京科技大学 | A kind of video object detection recognition method |
CN109274984A (en) * | 2018-10-16 | 2019-01-25 | 深圳开阳电子股份有限公司 | Detect the method, apparatus and image processing equipment of light source scintillation in video sequence |
CN109862389A (en) * | 2018-11-20 | 2019-06-07 | 北京奇艺世纪科技有限公司 | A kind of method for processing video frequency, device, server and storage medium |
CN110381276A (en) * | 2019-05-06 | 2019-10-25 | 华为技术有限公司 | A kind of video capture method and electronic equipment |
CN110675342A (en) * | 2019-09-18 | 2020-01-10 | 努比亚技术有限公司 | Video frame optimization method, mobile terminal and computer readable storage medium |
CN113129312A (en) * | 2018-10-15 | 2021-07-16 | 华为技术有限公司 | Image processing method, device and equipment |
CN113596573A (en) * | 2021-07-28 | 2021-11-02 | Oppo广东移动通信有限公司 | Image processing method, image processing device, electronic equipment and computer readable storage medium |
CN113705665A (en) * | 2021-08-26 | 2021-11-26 | 荣耀终端有限公司 | Training method of image transformation network model and electronic equipment |
-
2021
- 2021-12-15 CN CN202111531311.7A patent/CN114363659A/en active Pending
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050018920A1 (en) * | 2003-07-22 | 2005-01-27 | Warner Bros. Entertainment Inc. | Method and apparatus for flicker removal from an image sequence |
CN102006423A (en) * | 2010-11-15 | 2011-04-06 | 无锡中星微电子有限公司 | Camera and method and device for eliminating flicker phenomenon of same |
CN109063694A (en) * | 2018-09-12 | 2018-12-21 | 北京科技大学 | A kind of video object detection recognition method |
CN113129312A (en) * | 2018-10-15 | 2021-07-16 | 华为技术有限公司 | Image processing method, device and equipment |
CN109274984A (en) * | 2018-10-16 | 2019-01-25 | 深圳开阳电子股份有限公司 | Detect the method, apparatus and image processing equipment of light source scintillation in video sequence |
CN109862389A (en) * | 2018-11-20 | 2019-06-07 | 北京奇艺世纪科技有限公司 | A kind of method for processing video frequency, device, server and storage medium |
CN110381276A (en) * | 2019-05-06 | 2019-10-25 | 华为技术有限公司 | A kind of video capture method and electronic equipment |
CN110675342A (en) * | 2019-09-18 | 2020-01-10 | 努比亚技术有限公司 | Video frame optimization method, mobile terminal and computer readable storage medium |
CN113596573A (en) * | 2021-07-28 | 2021-11-02 | Oppo广东移动通信有限公司 | Image processing method, image processing device, electronic equipment and computer readable storage medium |
CN113705665A (en) * | 2021-08-26 | 2021-11-26 | 荣耀终端有限公司 | Training method of image transformation network model and electronic equipment |
Non-Patent Citations (2)
Title |
---|
周磊;倪强;周源华;: "一种基于块的图像序列闪烁修复方法", 上海交通大学学报 * |
管萌萌;曹纭;张怡暄;赵险峰;: "基于自适应奇异值调制的抗转码视频隐写算法", 信息安全学报 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111031346B (en) | Method and device for enhancing video image quality | |
CN108229526B (en) | Network training method, network training device, image processing method, image processing device, storage medium and electronic equipment | |
CN108492287B (en) | Video jitter detection method, terminal equipment and storage medium | |
JP2009147911A (en) | Video data compression preprocessing method, video data compression method employing the same and video data compression system | |
CN109671055B (en) | Pulmonary nodule detection method and device | |
CN110166851B (en) | Video abstract generation method and device and storage medium | |
KR101437626B1 (en) | System and method for region-of-interest-based artifact reduction in image sequences | |
CN112148942B (en) | Business index data classification method and device based on data clustering | |
JP6275719B2 (en) | A method for sampling image colors of video sequences and its application to color clustering | |
US20210027463A1 (en) | Video image processing and motion detection | |
JP2014110020A (en) | Image processor, image processing method and image processing program | |
JP2021111228A (en) | Learning device, learning method, and program | |
CN114363659A (en) | Method, device, equipment and storage medium for reducing video flicker | |
CN116958113A (en) | Product detection method, device, equipment and storage medium | |
CN112749660B (en) | Method and device for generating video content description information | |
CN109328373B (en) | Image processing method, related device and storage medium thereof | |
CN111899239A (en) | Image processing method and device | |
CN110189272B (en) | Method, apparatus, device and storage medium for processing image | |
CN114167223B (en) | Power supply abnormity detection method and device and computer readable storage medium | |
JP2018200506A (en) | Image processing apparatus and image processing method | |
CN115063299B (en) | Image preprocessing method and device, electronic equipment and storage medium | |
US20230377311A1 (en) | Image processing apparatus and method, and storage medium | |
CN114782284B (en) | Motion data correction method, device, equipment and storage medium | |
CN111126571B (en) | R-CNN network optimization method based on DHT network and storage medium | |
US20230245425A1 (en) | Image processing apparatus, image processing method and storage medium |
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 |