WO2024109875A1 - 视频处理方法、装置、设备及介质 - Google Patents
视频处理方法、装置、设备及介质 Download PDFInfo
- Publication number
- WO2024109875A1 WO2024109875A1 PCT/CN2023/133612 CN2023133612W WO2024109875A1 WO 2024109875 A1 WO2024109875 A1 WO 2024109875A1 CN 2023133612 W CN2023133612 W CN 2023133612W WO 2024109875 A1 WO2024109875 A1 WO 2024109875A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- frame image
- motion
- target
- blur
- blurred
- Prior art date
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 34
- 230000033001 locomotion Effects 0.000 claims abstract description 367
- 238000000034 method Methods 0.000 claims abstract description 70
- 238000012545 processing Methods 0.000 claims abstract description 65
- 230000004044 response Effects 0.000 claims abstract description 7
- 239000013598 vector Substances 0.000 claims description 88
- 230000000875 corresponding effect Effects 0.000 claims description 69
- 230000003287 optical effect Effects 0.000 claims description 51
- 238000004422 calculation algorithm Methods 0.000 claims description 49
- 238000005070 sampling Methods 0.000 claims description 43
- 230000004927 fusion Effects 0.000 claims description 23
- 230000006870 function Effects 0.000 claims description 21
- 238000004590 computer program Methods 0.000 claims description 18
- 230000002457 bidirectional effect Effects 0.000 claims description 13
- 238000012935 Averaging Methods 0.000 claims description 3
- 230000002596 correlated effect Effects 0.000 claims description 3
- 230000001186 cumulative effect Effects 0.000 claims description 3
- 230000000694 effects Effects 0.000 description 51
- 230000008569 process Effects 0.000 description 12
- 230000007704 transition Effects 0.000 description 10
- 238000010586 diagram Methods 0.000 description 9
- 230000014509 gene expression Effects 0.000 description 8
- 230000003044 adaptive effect Effects 0.000 description 7
- 238000009877 rendering Methods 0.000 description 7
- 230000001427 coherent effect Effects 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 5
- 238000004364 calculation method Methods 0.000 description 4
- 238000011160 research Methods 0.000 description 4
- 230000009466 transformation Effects 0.000 description 4
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 3
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 3
- 230000007547 defect Effects 0.000 description 3
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000012805 post-processing Methods 0.000 description 2
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 1
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 1
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 238000007499 fusion processing Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/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/44012—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 rendering scenes according to scene graphs, e.g. MPEG-4 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
Definitions
- the present disclosure relates to the field of video processing technology, and in particular to a video processing method, device, equipment and medium.
- video editing software As users' editing needs increase, the functions of video editing software are becoming more diverse. Some video editing software has begun to provide motion blur effects, which create a sense of dynamics and atmosphere through motion blur, thereby enhancing the expressiveness of the video.
- the present disclosure provides a video processing method, apparatus, device and medium.
- an embodiment of the present disclosure provides a video processing method, the method comprising: in response to receiving a motion blur request initiated by a user for a target video, obtaining motion blur information set by the user; wherein the motion blur information is used to indicate a blur processing method; performing inter-frame motion estimation on a target frame image in the target video and an associated frame image of the target frame image according to the motion blur information, and obtaining a motion trend between the target frame image and the associated frame image; wherein the target frame image is an image to be blurred; based on the associated frame image and the motion trend, blurring the target frame image to obtain a blurred frame image corresponding to the target frame image; and generating a motion blurred video corresponding to the target video based on the blurred frame image.
- an embodiment of the present disclosure provides a video processing device, comprising: a parameter acquisition module, used to obtain motion blur information set by a user in response to receiving a motion blur request initiated by a user for a target video; wherein the motion blur information is used to indicate a blur processing method; a motion estimation module, used to perform inter-frame motion estimation on a target frame image in the target video and an associated frame image of the target frame image according to the motion blur direction, and obtain a motion trend between the target frame image and the associated frame image; wherein the target frame image is an image to be blurred; a blur processing module, used to blur the target frame image based on the associated frame image and the motion trend, and obtain a blurred frame image corresponding to the target frame image; and a video generation module, used to generate a motion blurred video corresponding to the target video based on the blurred frame image.
- an embodiment of the present disclosure further provides an electronic device, comprising: a processor; a memory for storing executable instructions of the processor; the processor is used to read the executable instructions from the memory and execute the instructions to implement a video processing method as provided in an embodiment of the present disclosure.
- an embodiment of the present disclosure further provides a non-transitory computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute the video processing method provided by the embodiment of the present disclosure.
- the embodiments of the present disclosure further provide a computer program, which, when executed by a processor, implements the video processing method provided in the embodiments of the present disclosure.
- FIG1 is a schematic flow chart of a video processing method provided by an embodiment of the present disclosure.
- FIG2 is a schematic diagram of a motion blur direction provided by an embodiment of the present disclosure.
- FIG3 is a schematic flow chart of a motion blur method provided by an embodiment of the present disclosure.
- FIG4 is a schematic diagram of a flow chart of another motion blur method provided by an embodiment of the present disclosure.
- FIG5 is a schematic diagram of a video frame sending and receiving provided by an embodiment of the present disclosure.
- FIG6 is a schematic diagram of the structure of a video processing device provided by an embodiment of the present disclosure.
- FIG. 7 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure.
- the inventor has found through research that the motion blur special effects provided by existing software have a single form of expression, poor motion blur effect, and are mostly difficult to satisfy users.
- the technical solution provided by the embodiment of the present disclosure can obtain the motion trend between the target frame image to be blurred and the associated frame image in the target video based on the motion blur information set by the user, and blur the target frame image based on the associated frame image and the motion trend, and then generate a motion blurred video based on the blurred frame image corresponding to the target frame image.
- the above method helps to achieve a more realistic and coherent motion blur effect for the motion blurred video, and does not use fixed parameters for motion blur processing, but blurs the target video based on the motion blur information set by the user.
- the user can personalize the motion blur information according to their own needs, and different motion blur information can form a variety of blur effects with rich expressions, so that the final motion blurred video is more in line with user needs.
- the inventor has found through research that there are two main implementation methods of motion blur special effects provided by existing software: 1) Pre-set fixed parameters such as motion direction and blur intensity. Regardless of the type of video, the preset parameters are used for motion blur processing, which belongs to the static blur processing method. 2) Determine the direction of motion blur rendering based on the motion direction of the subject, and match the intensity of motion blur rendering based on the speed of the subject, so that the video has a motion blur effect. For the first method, the resulting motion blur video has a single expression form and poor effect, which is difficult to meet user needs.
- the blur rendering direction can be determined based on the subject motion blur direction in the original video to be blurred, and the blur rendering intensity can be determined according to the subject motion speed, but for a kind of original video, the resulting motion blur effect is also fixed, and there is still a problem of a single expression form, and the blur rendering direction and blur rendering intensity determined according to the original video may not be what the user needs, so it is also difficult to meet user needs.
- the embodiments of the present disclosure provide a video processing method, apparatus, device and medium, which are described in detail below.
- FIG1 is a flow chart of a video processing method provided by an embodiment of the present disclosure, which can be executed by a video processing device, wherein the device can be implemented by software and/or hardware, and can generally be integrated in an electronic device. As shown in FIG1 , the method mainly includes the following steps S102 to S108:
- Step S102 in response to receiving a motion blur request initiated by a user for a target video, obtaining motion blur information set by the user.
- the motion blur information is used to indicate the blur processing method, such as indicating the specific mode and blur degree of motion blurring the video frames in the target video.
- the embodiments of the present disclosure do not limit the specific content contained in the motion blur information.
- the key information required for motion blur processing can be set by the user.
- the motion blur information may include the motion blur mode and blur degree, and further, may include the fusion degree, etc.
- one or more setting items for setting the motion blur information may be provided to the user on the client interface, so that the user can set the required information according to the needs, such as setting corresponding setting items for the motion blur mode, blur degree and fusion degree, so that the user can flexibly set the required motion blur information according to the needs.
- the motion blur mode includes a bidirectional mode and a unidirectional mode; wherein the unidirectional mode can be further divided into a leading mode and a trailing mode, and different motion blur modes correspond to different combinations of frame images to be processed.
- different motion blur modes select different associated frame images of the target frame image, and the obtained effects are also different.
- three options of bidirectional mode, leading mode and trailing mode can be provided to the user.
- the bidirectional mode the front and rear frame images of the target frame image are all associated frame images.
- the leading mode the previous frame image of the target frame image is used as the associated frame image.
- the trailing mode the next frame image of the target frame image is used as the associated frame image.
- the degree of blur can be divided by a numerical range or by a level. For example, on the client interface, a blur interval of 0 to 100 can be provided to the user, and the smaller the value, the lower the degree of blur; for another example, a blur level of 0 to 10 can be provided to the user, and the smaller the level, the lower the degree of blur.
- the degree of fusion can also be divided in the above manner, which will not be repeated here. The above description is merely illustrative and should not be considered limiting.
- Step S104 performing inter-frame motion estimation on a target frame image and an associated frame image of the target frame image in the target video according to the motion blur information, and obtaining a motion trend between the target frame image and the associated frame image; wherein the target frame image is an image to be blurred.
- the target frame image and the corresponding associated frame image mainly depend on the motion blur mode.
- the target frame image and the corresponding associated frame image in the target video can be first determined according to the motion blur mode, and then the inter-frame motion estimation of the target frame image and the associated frame image can be performed to evaluate the target frame image and the associated frame image.
- Motion trend between frame images can be represented by a motion vector (i.e., optical flow).
- FIG. 2 a motion blur direction schematic diagram shown in FIG. 2 is shown, which illustrates the previous frame (frame L-1), the middle frame (frame L) and the following frame (frame L+1).
- the inter-frame motion estimation method can also help the subsequent motion blur video to produce a more realistic motion blur effect and improve the coherence between frames.
- the remaining frame images can be used as target frame images to be blurred, and the associated frame images of the target frame images are different due to different motion blur modes.
- Step S106 based on the associated frame image and the motion trend, the target frame image is blurred to obtain a blurred frame image corresponding to the target frame image.
- the target frame image can be further blurred based on the associated frame image, the motion trend and the blur degree to obtain a blurred frame image corresponding to the target frame image. Different blur degrees will produce different blur effects on the blurred frame image.
- the target frame image may be blurred based on a path interpolation method, such as sampling each pixel point multiple times on the motion path between the associated frame image and the target frame image to obtain multiple pixel sampling values, and then fusing the multiple pixel sampling values corresponding to each pixel point and the original pixel value on the target frame image to obtain a blurred frame image corresponding to the target frame image.
- a path interpolation method such as sampling each pixel point multiple times on the motion path between the associated frame image and the target frame image to obtain multiple pixel sampling values, and then fusing the multiple pixel sampling values corresponding to each pixel point and the original pixel value on the target frame image to obtain a blurred frame image corresponding to the target frame image.
- the blurring effect of the blurred frame image may be adjusted based on the blurring degree.
- Step S108 generating a motion blurred video corresponding to the target video based on the blurred frame image.
- the blurred frame images corresponding to the obtained target frame images can be directly sorted in time order to obtain the motion blurred video corresponding to the target video; in other implementation examples, the blurred frame images can also be post-processed and the post-processed blurred frame images can be sorted in time order to obtain the motion blurred video corresponding to the target video.
- unblurred images such as the first frame/last frame in the target video can be left unprocessed and arranged in order with the blurred frame images to generate the motion blurred video, such as the first frame image of the motion blurred video is still the first frame image of the target video, and the remaining frame images of the motion blurred video are all blurred frame images corresponding to the remaining frame images in the target video.
- the motion blurred video obtained by the above method can achieve a more realistic and coherent motion blur effect, and does not use fixed parameters for motion blur processing, but blurs the target video based on the motion blur information set by the user.
- the user can personalize the motion blur information according to their own needs. Different motion blur information can form a variety of blur effects with rich expressions, so that the final motion blurred video is more in line with user needs.
- the embodiment of the present disclosure provides a specific implementation method for performing inter-frame motion estimation on the target frame image and the associated frame image of the target frame image in the target video according to the motion blur information, which can be implemented by referring to the following steps A to C:
- Step A determining the frame image to be blurred in the target video according to the motion blur mode, and using the frame image to be blurred as the target frame image. Specifically, it can be implemented with reference to the following three situations:
- the motion blur mode is a bidirectional mode
- other frame images except the first frame image and the last frame image in the target video are used as frame images to be blurred in the target video.
- each frame image except the first frame image and the last frame image can be used as a frame image to be blurred.
- other specified frame images except the first frame image and the last frame image can also be used as frame images to be blurred.
- the specific setting can be flexibly based on the needs and is not limited here. It can be understood that in the bidirectional mode, the frame image to be blurred needs to be blurred with the help of the previous and next two frame images, so other frame images except the first frame image and the last frame image can be selected as the target frame image. That is, the first and last frame images in the target video cannot be bidirectionally blurred.
- the motion blur mode is the leading mode
- the other frame images in the target video except the first frame image are used as the frame images to be blurred in the target video.
- each frame image except the first frame image can be used as the frame image to be blurred.
- other specified frame images except the first frame image can also be used as the frame images to be blurred.
- the specific setting can be flexibly based on the needs and is not limited here. It can be understood that when the motion blur mode is the leading mode, the frame image to be blurred needs to be blurred with the help of the previous frame image, so the other frame images except the first frame image can be selected as the target frame image. That is, the first frame image in the target video cannot be forward blurred.
- the frame images other than the last frame image in the target video are used as the frame images to be blurred in the target video.
- each frame image other than the last frame image can be used as the frame image to be blurred.
- other specified frame images other than the last frame image can also be used as the frame images to be blurred.
- the specific setting can be flexibly made according to the requirements and is not limited here. It can be understood that when the motion blur mode is the drag mode, the frame image to be blurred needs to be blurred with the help of the next frame image, so it can be selected.
- the other frame images except the last frame image are taken as the target frame images. That is, the last frame image in the target video cannot be subjected to the backward blurring process.
- the above method of determining the target frame image to be blurred based on the motion blur mode is more reasonable and also in line with the actual situation.
- Step B determining the associated frame image of the target frame image in the target video according to the motion blur mode. Specifically, it can also be implemented with reference to the following three situations:
- the motion blur mode is a bidirectional mode
- the previous frame image and the next frame image of the target frame image are used as associated frame images of the target frame image.
- the motion blur mode is the leading mode
- the previous frame image of the target frame image is used as the associated frame image of the target frame image.
- the frame image following the target frame image is used as the associated frame image of the target frame image.
- the above method of determining the associated frame image of the target frame image based on the motion blur mode is more reliable.
- the target frame image is subsequently blurred based on the associated frame image of the target frame image, thereby achieving the motion blur form required by the user.
- Step C using a preset optical flow algorithm to perform inter-frame motion estimation on the target frame image and the associated frame image.
- the disclosed embodiments do not limit the optical flow algorithm.
- the preset optical flow algorithm may adopt a dense optical flow algorithm.
- the inter-frame motion estimation of the target frame image and the associated frame image may be performed based on the DIS optical flow algorithm.
- the DIS optical flow algorithm is the abbreviation of the Dense Inverse Search-based method. Specifically, the DIS algorithm scales the image to different scales, constructs an image pyramid, and then estimates the optical flow (i.e., motion vector) layer by layer starting from the layer with the smallest resolution. The optical flow estimated at each layer will be used as the initialization of the estimation of the next layer, so as to achieve the purpose of accurately estimating motions of different magnitudes.
- the original DIS optical flow algorithm can be directly used to estimate the inter-frame motion of the target frame image and the associated frame image, or it can be improved on the basis of the original DIS optical flow algorithm, and the improved DIS optical flow algorithm can be used to estimate the inter-frame motion of the target frame image and the associated frame image.
- a method for estimating the inter-frame motion of the target frame image and the associated frame image based on the improved DIS optical flow algorithm is provided, which can be implemented by referring to steps C1 to C4:
- Step C1 downsampling the target frame image and the associated frame image respectively.
- the target frame image and the associated frame image can be downsampled to 1/2 resolution, which helps to improve the image processing efficiency of the subsequent DIS optical flow algorithm and reduce the calculation cost of the algorithm by reducing the image resolution.
- Step C2 based on the improved DIS optical flow algorithm, inter-frame motion estimation is performed on the downsampled target frame image and the downsampled associated frame image to obtain a first motion vector; wherein, the number of iterations used by the improved DIS optical flow algorithm is less than the number of iterations used by the original DIS optical flow algorithm.
- the disclosed embodiment simplifies the DIS optical flow algorithm, and when using gradient descent iterative optimization to solve, the number of iterations used by the original DIS optical flow algorithm can be reduced. For example, the applicant has found through research that changing the 12 iterations of the original DIS optical flow algorithm to 5 iterations can also better ensure the accuracy of the optical flow, and at the same time can better reduce the calculation cost.
- the associated frame images of the target frame image are the front and back frame images, so it is necessary to perform motion estimation between the front frame image and the target frame image, and between the target frame image and the back frame image, respectively, and the first motion vector obtained includes a forward motion vector (forward optical flow) and a backward motion vector (backward optical flow).
- the first motion vector is only a forward motion vector or a backward motion vector, which will not be described in detail here.
- Step C3 perform an upsampling operation on the first motion vector to obtain a second motion vector.
- the first motion vector is obtained by a simplified DIS optical flow algorithm.
- the first motion vector is essentially the optical flow of the image after downsampling by 1/2, which is equivalent to the sparse optical flow of every 2*2 pixels in the original image.
- the first motion vector can be upsampled to obtain the second motion vector, and the dense optical flow of the original image can be obtained.
- Step C4 obtaining a motion vector between the target frame image and the associated frame image based on the second motion vector.
- the second motion vector can be mean blurred, and the second motion vector after mean blurred processing can be used as the motion vector between the target frame image and the associated frame image.
- a 9*9 kernel can be used to mean blur the second motion vector.
- the block effect of the optical flow calculation can be effectively removed, the block edge can be weakened, the block distortion phenomenon that occurs in subsequent interpolation can be reduced, and the motion blur effect can be enhanced.
- the second motion vector can also be directly used as the motion vector between the target frame image and the associated frame image, which is more convenient and quick. The above method can be flexibly selected according to specific needs and is not limited here.
- the disclosed embodiments may also provide users with an optional deformation blur function, that is, the deformation blur effect can be integrated into the motion blur processing process.
- the motion blur information also includes the state of the deformation blur function, which includes an on state or an off state; based on this, when blurring the target frame image based on the associated frame image, motion trend and blur degree, the target frame image may be blurred based on the associated frame image, motion trend and blur degree according to the state of the deformation blur function.
- the target frame image When the deformation blur function is in the off state, the target frame image may be blurred only based on the associated frame image, motion trend and blur degree; and
- the deformation blur effect can be integrated into the motion blur processing process under the triggering of a specified condition.
- the specified condition can be that the target frame image belongs to a transition frame image, or the target video is a slideshow video, etc.
- the above method helps to integrate the deformation blur effect into the motion blur processing process, especially for transition videos or slideshow videos, by integrating the deformation blur effect, the resulting motion blur effect can be smoother and more natural.
- the embodiment of the present disclosure provides a specific implementation method for blurring the target frame image according to the state of the deformation blur function, based on the associated frame image, motion trend and blur degree, which can be implemented by referring to the following step 1 and step 2a or step 2b:
- Step 1 when the deformation blur function is turned on, determine whether the image contents between the target frame image and the associated frame image are related.
- the disclosed embodiments fully take into account that when there is no correlation between the image contents of two frames (such as transition videos or slideshow videos), the reliability of the motion vectors obtained by directly estimating the motion of the two frames is poor, which can easily lead to excessive distortion of the blurred image. Therefore, the content correlation between the images between the frames can be judged first, and in the case of no correlation, the associated frame images can be deformed and blurred to perform frame-to-frame transition and improve frame-to-frame continuity.
- the embodiment of the present disclosure provides a specific implementation method for determining whether the image content between the target frame image and the associated frame image is related: the SAD value between the target frame image and the associated frame image can be obtained based on a preset SAD algorithm; and then, whether the image content between the target frame image and the associated frame image is related is determined based on the SAD value and a preset threshold.
- the SAD (Sum of absolute differences) algorithm is a primary block matching algorithm in image stereo matching. Its basic operation idea is to obtain the sum of the absolute values of the differences between the pixel values in the corresponding left and right pixel blocks.
- the specific algorithm can be implemented with reference to the relevant technology and will not be repeated here.
- the disclosed embodiment uses the SAD algorithm to effectively and objectively measure the content relevance between two frames of images.
- a preset threshold can be directly set. If the SAD value between the two frames of images is greater than the preset threshold, it is considered that the image content of the target frame image is irrelevant to the associated frame image, that is, a transition or slide image switching has occurred.
- the discrimination can be made based on three frames of images.
- the first SAD value between frame L-1 and frame L and the second SAD value between frame L and frame L+1 can be calculated first, and then the SAD difference between the first SAD value and the second SAD value can be calculated. If the minimum value among the first SAD value, the second SAD value, and the SAD difference is greater than a preset threshold, it is considered that a transition or slide switch occurs between the target frame image and the associated frame image, that is, the image content between the target frame image and the associated frame image is unrelated. In the above manner, the content correlation between the two frames of images can be reasonably and objectively discriminated to obtain a more accurate discrimination result.
- Step 2a If the image contents of the target frame image and the associated frame image are related, blur processing is performed on the target frame image based on the associated frame image, motion trend and blur degree.
- Step 2b If the image contents between the target frame image and the associated frame image are not related, the associated frame image is subjected to deformation blurring processing, and based on the associated frame image after deformation blurring processing, the motion trend and blurring degree, the target frame image is subjected to blurring processing.
- the motion vector based on the estimation may also cause excessive distortion of the image in the motion blurred video.
- the associated frame images may be deformed and blurred.
- the associated frame images may be deformed and blurred by using a random projection transformation. The specific deformation and blurring method is not limited here.
- the above method can effectively reduce the distortion of the blurred frame image and make the motion blurred video more realistic.
- the motion trend is represented in the form of a motion vector (i.e., optical flow); on this basis, based on the associated frame image, the motion trend and the blur degree, the target frame image is blurred to obtain a blurred frame image corresponding to the target frame image.
- path interpolation can be performed based on the associated frame image, the motion trend and the blur degree, and the target frame image is blurred according to the path interpolation result (sampling multiple times on the motion path to obtain multiple pixel sampling values). Specifically, it can be implemented with reference to the following steps a to c:
- Step a adjusting the motion vector between the target frame image and the associated frame image based on the blur degree to obtain the adjusted motion vector.
- a proportional coefficient for adjusting the motion vector between the target frame image and the associated frame image can be determined according to the degree of blur; then the proportional coefficient is multiplied by the motion vector between the target frame image and the associated frame image to obtain the adjusted motion vector.
- the degree of blur can be used to change the motion vector (or optical flow value) obtained by the optical flow algorithm for motion estimation, and then the changed motion vector is used for subsequent blur processing.
- the degree of blur is 0 to 100, which can correspond to a proportional coefficient of 0 to 1.
- the optical flow value obtained by motion estimation is 0, so no blur processing will be performed, that is, the final motion blurred video is essentially the same as the original video; if the user sets the degree of blur to 100 (that is, the corresponding proportional coefficient is 1), the motion vector obtained by motion estimation will not change, that is, the target frame image is completely processed according to the motion vector calculated by the optical flow algorithm.
- the blur processing is performed to obtain the maximum blur effect. If the blur level set by the user is between 0 and 100, the final motion blur effect will be weakened in proportion to the specific value of the blur level.
- the blur level can also be set to a value such as 0 to 300. If the blur level selected by the user exceeds 100, the blur effect will be further exaggerated, and ultimately presented as a distortion effect. For example, a blur level of 200 corresponds to a proportional coefficient of 2, and a blur level of 300 corresponds to a proportional coefficient of 3. Still in the above manner, the motion vector output by the optical flow algorithm is multiplied by the proportional coefficient (2, 3, etc.), and then path interpolation and other processing are performed based on the adjusted motion vector. This can result in a more exaggerated distortion blur effect. By providing users with a wider range of blur levels, the user's diverse editing needs can be met.
- Step b obtaining the number of pixel sampling times corresponding to the adjusted motion vector.
- the number of pixel sampling times can be obtained based on the length of the adjusted motion vector; wherein the length is positively correlated with the number of pixel sampling times.
- This method can realize adaptive sampling and can effectively save computing costs.
- the number of pixel sampling times can also be determined by sampling at equal distances along the motion vector, and the interval distance between two sampling points can be set according to requirements.
- Step c blurring the target frame image according to the number of pixel sampling times and the adjusted motion vector, to obtain a blurred frame image corresponding to the target frame image.
- steps c1 to c3 can be referred to for implementation:
- Step c1 for each pixel point on the target frame image, obtain multiple pixel sampling values corresponding to the pixel point on the adjusted motion vector according to the pixel sampling times; for example, equidistant sampling can be performed based on the pixel sampling times to obtain multiple pixel sampling values.
- Step c2 performing cumulative averaging processing on the original pixel value of each pixel point on the target frame image and the multiple pixel sampling values corresponding to each pixel point to obtain the comprehensive pixel value corresponding to each pixel point;
- Step c3 generating a blurred frame image corresponding to the target frame image based on the comprehensive pixel value corresponding to each pixel point.
- each pixel on the motion path between two frames of images can be cumulatively averaged in an equidistant manner, thereby creating a smooth motion blur effect.
- the method of blurring the target frame image based on the adaptive sampling strategy provided by the above steps a to c can effectively reduce the computational cost while ensuring that the blur effect is natural and delicate.
- the motion blur information also includes the degree of fusion.
- the embodiment of the present disclosure can also provide users with a setting item for the degree of fusion. Users can set the parameters of the degree of fusion according to their needs. Therefore, the degree of fusion set by the user can also be obtained.
- the blurred frame image can be fused with the associated frame image based on the degree of fusion to obtain a fused frame image.
- the fused frame images corresponding to each blurred frame image are arranged in chronological order to generate a motion blurred video corresponding to the target video.
- the above method can also be called a fusion post-processing algorithm.
- the above fusion degree is essentially the ghosting degree.
- the fusion degree can be set to 0 to 100, corresponding to a fusion ratio of 0 to 1. If the fusion degree is 0, it is equivalent to not fusing the blurred frame image with the associated frame image.
- the output fused frame image is still essentially a blurred frame image. If the fusion degree is 100, the ghosting effect of the output fused frame image is the strongest.
- the pixels in the two frames of images can be weighted based on the fusion ratio corresponding to the fusion degree to obtain a fused frame image.
- the specific implementation can be referred to the relevant technology and will not be repeated here.
- the embodiment of the present disclosure further provides a flow chart of a motion blur method as shown in FIG3 , which mainly includes the following steps S302 to S314:
- Step S302 input a target frame image and an associated frame image.
- Step S304 determining whether the image contents between frames are related (i.e., determining whether a transition between frames or a slideshow switching occurs), if so, executing step S306, if not, executing step S308;
- Step S306 determine whether the deformation blur function is turned on. If yes, execute step S310, if not, execute step S308.
- Step S308 performing motion estimation on the associated frame image and the target frame image based on a dense optical flow algorithm, and then executing step S312.
- Step S310 performing transmission transformation processing on the associated frame image, and performing motion estimation on the processed associated frame image and the target frame image based on a dense optical flow algorithm.
- Step S312 performing motion blur processing on the target frame image based on an adaptive path interpolation algorithm.
- Step S314 output the blurred frame image corresponding to the target frame image.
- the specific implementation methods of the above steps can refer to the aforementioned related content and will not be repeated here.
- the method of judging the relevance of content between frames can effectively avoid the distortion and other problems caused by motion blur in transition videos or slideshow videos.
- the associated frame images can be subjected to deformation blur processing such as projection transformation, so as to ensure that the motion blur effect is as smooth and natural as possible.
- deformation blur processing such as projection transformation
- the computing cost can be effectively reduced while ensuring that the resulting blur effect is natural and delicate.
- the blurred frame images obtained in summary help to make the final motion blurred video achieve a more realistic and coherent motion blur effect.
- each target frame image can obtain a blurred frame image by adopting the above steps, and subsequently a motion blurred video can be directly generated based on the combination of the blurred frame images.
- the embodiment of the present disclosure further provides a flow chart of a motion blur method as shown in FIG. 4 , which mainly includes the following steps S402 to S416:
- Step S402 input a target frame image and an associated frame image.
- Step S404 determining whether the image contents between frames are related (i.e., determining whether a transition between frames or a slideshow switching occurs), if so, executing step S406, if not, executing step S408;
- Step S406 determining whether the deformation blur function is turned on. If yes, executing step S410, if not, executing step S408.
- Step S408 performing motion estimation on the associated frame image and the target frame image based on a dense optical flow algorithm, and then executing step S412.
- Step S410 performing transmission transformation processing on the associated frame image, and performing motion estimation on the processed associated frame image and the target frame image based on a dense optical flow algorithm.
- Step S412 performing motion blur processing on the target frame image based on an adaptive path interpolation algorithm.
- Step S414 performing fusion post-processing on the blurred frame image corresponding to the target frame image based on the associated frame image.
- Step S416 outputting the blurred frame image corresponding to the target frame image after fusion processing.
- the embodiment of the present disclosure also provides a schematic diagram of video frame sending and output as shown in FIG5 , where the input frames are X1, X2, X3, X4, X5 ... Xn-1, Xn; the output frames are Y1, Y2, Y3, Y4, Y5 ... Yn-1, Yn.
- the number of output frames is exactly equal to the number of input frames, that is, the number of frames of the motion blurred video is the same as the number of frames of the original target video.
- X1 corresponds to Y1
- X2 corresponds to Y2 (such as the blurred frame image of X2 is Y2)
- X3 corresponds to Y3, and so on.
- This embodiment is also a theoretical method, and the above method can be applied in the scenario where the required frame can be directly obtained. For example, all frames in the video can be obtained first, and then the motion blur processing method provided by the embodiment of the present disclosure is used for each frame image to be blurred to obtain a blurred frame image, and then the motion blurred video is formed.
- the dislocation method can be used to achieve it.
- X2 as the target frame image
- X1 and X3 are required as associated frame images
- X2 and X4 are required as associated frame images.
- X2 can be blurred based on X1 to obtain Y2; when X3 is obtained, X4 cannot be directly obtained.
- X2 can be bidirectionally blurred based on X1 and X3 to obtain the blurred frame image X2' corresponding to X2.
- X2' can be dislocated as the third frame Y3 of the motion blurred video, and so on until Xn is obtained.
- Xn-1 can be blurred based on Xn, and Xn-1' can be used as Yn.
- FIG5 is an example of the above-mentioned dislocation method, but it should not be regarded as a limitation.
- Xn-1 can be bidirectionally blurred based on Xn-2 and Xn, and the obtained Xn-1' can be used as Yn, or Xn can be simply copied and the copied Xn can be used as Yn.
- the corresponding processing method can be flexibly selected according to the needs, and it is not limited here.
- the video processing method provided by the embodiment of the present disclosure does not use fixed parameters for motion blur processing, but blurs the target video based on the motion blur information set by the user.
- Different motion blur modes and different blur degrees can form a variety of blur effects with rich expressions.
- it can further provide users with deformation blur function setting items and fusion degree setting items, and provide deformation blur effects and ghosting effects according to the content correlation between frames. Not only is the resulting motion blur effect richer, but it is also applicable to special videos such as transition videos and slide videos, and has a wider range of applications.
- the adaptive path interpolation algorithm and the simplified optical flow algorithm can ensure a better motion blur effect to a certain extent, while also effectively reducing the computing cost, facilitating real-time rendering, and can be applied to computers or mobile terminals.
- the motion blurred video obtained from the above can achieve a more realistic and coherent motion blur effect, and better meet the diversified needs of users.
- FIG6 is a schematic diagram of the structure of a video processing device provided by the embodiment of the present disclosure.
- the device can be implemented by software and/or hardware and can generally be integrated in an electronic device. As shown in FIG6 , the device includes:
- the parameter acquisition module 602 is used to obtain the motion blur information set by the user in response to receiving the motion blur request initiated by the user for the target video; wherein the motion blur information is used to indicate the blur processing method;
- the motion estimation module 604 is used to perform inter-frame motion estimation on the target frame image and the associated frame image of the target frame image in the target video according to the motion blur information, so as to obtain the motion trend between the target frame image and the associated frame image; wherein the target frame image is the image to be blurred;
- a blur processing module 606 is used to perform blur processing on the target frame image based on the associated frame image and the motion trend to obtain a blurred frame image corresponding to the target frame image;
- the video generation module 608 is used to generate a motion blurred video corresponding to the target video based on the blurred frame image.
- the motion blurred video obtained by the above-mentioned device can achieve a more realistic and coherent motion blur effect, and does not use fixed parameters for motion blur processing, but blurs the target video based on the motion blur information set by the user.
- the user can personalize the motion blur information according to their own needs. Different motion blur information can form a variety of blur effects with rich expressions, so that the final motion blurred video is more in line with user needs.
- the motion blur information includes a motion blur mode
- the motion estimation module 604 is specifically used to: determine the frame image to be blurred in the target video according to the motion blur mode, and use the frame image to be blurred as the target frame image; determine the associated frame image of the target frame image in the target video according to the motion blur mode; and use a preset optical flow algorithm to perform inter-frame motion estimation on the target frame image and the associated frame image.
- the motion estimation module 604 is specifically used for: when the motion blur mode is a bidirectional mode, using the other frame images in the target video except the first frame image and the last frame image as the frame images to be blurred in the target video; when the motion blur mode is a leading mode, using the other frame images in the target video except the first frame image as the frame images to be blurred in the target video; when the motion blur mode is a smear mode, using the other frame images in the target video except the last frame image as the frame images to be blurred in the target video.
- the motion estimation module 604 is specifically configured to: when the motion blur mode is a bidirectional mode, use the previous frame image and the next frame image of the target frame image as associated frame images of the target frame image; when the motion blur mode is a leading mode, use the previous frame image of the target frame image as the target frame image. an associated frame image of a frame image; and when the motion blur mode is a smear mode, taking a subsequent frame image of the target frame image as an associated frame image of the target frame image.
- the motion estimation module 604 is specifically used to: perform downsampling processing on the target frame image and the associated frame image respectively; perform inter-frame motion estimation on the downsampled target frame image and the downsampled associated frame image based on the improved DIS optical flow algorithm to obtain a first motion vector; wherein the number of iterations used by the improved DIS optical flow algorithm is less than the number of iterations used by the original DIS optical flow algorithm; perform an upsampling operation on the first motion vector to obtain a second motion vector; and obtain a motion vector between the target frame image and the associated frame image based on the second motion vector.
- the motion estimation module 604 is specifically configured to: perform mean blur processing on the second motion vector, and use the second motion vector after the mean blur processing as the motion vector between the target frame image and the associated frame image.
- the motion blur information includes a blur degree
- the blur processing module 606 is specifically configured to perform blur processing on the target frame image based on the associated frame image, the motion trend and the blur degree.
- the motion blur information also includes the state of the deformation blur function; the state includes an on state or an off state; the blur processing module 606 is specifically used to: blur the target frame image according to the state of the deformation blur function, based on the associated frame image, the motion trend and the blur degree.
- the blur processing module 606 is specifically used to: when the state of the deformation blur function is turned on, determine whether the image content between the target frame image and the associated frame image is related; if the image content between the target frame image and the associated frame image is related, blur the target frame image based on the associated frame image, the motion trend and the blur degree; if the image content between the target frame image and the associated frame image is not related, perform deformation blur processing on the associated frame image, and blur the target frame image based on the associated frame image after the deformation blur processing, the motion trend and the blur degree.
- the blur processing module 606 is specifically used to: obtain the SAD value between the target frame image and the associated frame image based on a preset SAD algorithm; and determine whether the image content between the target frame image and the associated frame image is related based on the SAD value and a preset threshold.
- the motion trend is represented in the form of a motion vector
- the blur processing module 606 is specifically used to: adjust the motion vector between the target frame image and the associated frame image based on the blur degree to obtain an adjusted motion vector; obtain the number of pixel samplings corresponding to the adjusted motion vector; and
- the target frame image is blurred based on the number of point sampling times and the adjusted motion vector to obtain a blurred frame image corresponding to the target frame image.
- the blur processing module 606 is specifically used to: determine a proportional coefficient for adjusting the motion vector between the target frame image and the associated frame image according to the blur degree; multiply the proportional coefficient by the motion vector between the target frame image and the associated frame image to obtain an adjusted motion vector.
- the blur processing module 606 is specifically used to: obtain the number of pixel sampling times based on the length of the adjusted motion vector; wherein the length is positively correlated with the number of pixel sampling times.
- the blur processing module 606 is specifically used to: for each pixel point on the target frame image, obtain multiple pixel sampling values corresponding to the pixel point on the adjusted motion vector according to the number of pixel sampling times; perform cumulative averaging processing on the original pixel value of each pixel point on the target frame image and the multiple pixel sampling values corresponding to each pixel point to obtain a comprehensive pixel value corresponding to each pixel point; and generate a blurred frame image corresponding to the target frame image based on the comprehensive pixel value corresponding to each pixel point.
- the motion blur information also includes a degree of fusion; on this basis, the video generation module 608 is specifically used to: based on the degree of fusion, fuse the blurred frame image with the associated frame image to obtain a fused frame image; arrange the fused frame images corresponding to each of the blurred frame images in chronological order to generate a motion blurred video corresponding to the target video.
- the video processing device provided in the embodiments of the present disclosure can execute the video processing method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
- FIG7 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. As shown in FIG7 , the electronic device 700 includes one or more processors 701 and a memory 702 .
- the processor 701 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and/or instruction execution capabilities, and may control other components in the electronic device 700 to perform desired functions.
- CPU central processing unit
- Other components in the electronic device 700 may control other components in the electronic device 700 to perform desired functions.
- the memory 702 may include one or more computer program products, and the computer program products may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory.
- the volatile memory may include, for example, a random access memory (RAM) and/or a cache memory (cache), etc.
- the non-volatile memory may include, for example, a read-only memory (ROM), a hard disk, a flash memory, etc.
- One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 701 may execute the program instructions to implement the above-mentioned The video processing method of the embodiment of the present disclosure and/or other desired functions described above.
- Various contents such as input signals, signal components, noise components, etc. can also be stored in the computer-readable storage medium.
- the electronic device 700 may further include: an input device 703 and an output device 704, and these components are interconnected via a bus system and/or other forms of connection mechanisms (not shown).
- the input device 703 may also include, for example, a keyboard, a mouse, and the like.
- the output device 704 can output various information to the outside, including the determined distance information, direction information, etc.
- the output device 704 can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, and the like.
- FIG7 only shows some of the components related to the present disclosure in the electronic device 700, omitting components such as a bus, an input/output interface, etc.
- the electronic device 700 may further include any other appropriate components according to specific application scenarios.
- the embodiment of the present disclosure may also be a computer program product, which includes computer program instructions.
- the processor executes the video processing method provided by the embodiment of the present disclosure.
- the computer program product may be written in any combination of one or more programming languages to write program code for performing the operations of the disclosed embodiments, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages.
- the program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
- embodiments of the present disclosure may also be a non-transitory computer-readable storage medium on which computer program instructions are stored.
- the processor executes the video processing method provided by the embodiments of the present disclosure.
- the computer readable storage medium may be any combination of one or more readable media.
- the readable medium may be a readable signal medium or a readable storage medium.
- the readable storage medium may include, for example, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any combination of the above.
- readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
- RAM random access memory
- ROM read-only memory
- EPROM or flash memory erasable programmable read-only memory
- CD-ROM compact disk read only memory
- magnetic storage device or any suitable combination of the above.
- the embodiments of the present disclosure further provide a computer program product, including a computer program/instruction, which implements the video processing method in the embodiments of the present disclosure when executed by a processor.
- the embodiment of the present disclosure further provides a computer program, which, when executed by a processor, implements the video processing method in the embodiment of the present disclosure.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Image Processing (AREA)
Abstract
本公开实施例涉及一种视频处理方法、装置、设备及介质,其中该方法包括:响应于接收到用户针对目标视频发起的运动模糊请求,获取用户设置的运动模糊信息;所述运动模糊信息用于指示模糊处理方式;根据所述运动模糊信息对所述目标视频中的目标帧图像与所述目标帧图像的关联帧图像进行帧间运动估计,得到所述目标帧图像和所述关联帧图像之间的运动趋势;基于所述关联帧图像和所述运动趋势,对所述目标帧图像进行模糊处理,得到所述目标帧图像对应的模糊帧图像;基于所述模糊帧图像生成所述目标视频对应的运动模糊视频。
Description
相关申请的交叉引用
本公开要求于2022年11月23日提交的名称为“视频处理方法、装置、设备及介质”的中国专利申请第202211475553.3号的优先权,该申请的公开通过引用被全部结合于此。
本公开涉及视频处理技术领域,尤其涉及一种视频处理方法、装置、设备及介质。
随着用户剪辑需求的提升,视频剪辑软件的功能逐渐多样化。部分视频剪辑软件开始提供运动模糊特效,通过运动模糊营造出虚晃流动的动态感及氛围感,从而增强视频表现力。
发明内容
本公开提供了一种视频处理方法、装置、设备及介质。
第一方面,本公开实施例提供了一种视频处理方法,所述方法包括:响应于接收到用户针对目标视频发起的运动模糊请求,获取用户设置的运动模糊信息;其中,所述运动模糊信息用于指示模糊处理方式;根据所述运动模糊信息对所述目标视频中的目标帧图像与所述目标帧图像的关联帧图像进行帧间运动估计,得到所述目标帧图像和所述关联帧图像之间的运动趋势;其中,所述目标帧图像为待模糊处理的图像;基于所述关联帧图像和所述运动趋势,对所述目标帧图像进行模糊处理,得到所述目标帧图像对应的模糊帧图像;基于所述模糊帧图像生成所述目标视频对应的运动模糊视频。
第二方面,本公开实施例提供了一种视频处理装置,包括:参数获取模块,用于响应于接收到用户针对目标视频发起的运动模糊请求,获取用户设置的运动模糊信息;其中,所述运动模糊信息用于指示模糊处理方式;运动估计模块,用于根据所述运动模糊方向对所述目标视频中的目标帧图像与所述目标帧图像的关联帧图像进行帧间运动估计,得到所述目标帧图像和所述关联帧图像之间的运动趋势;其中,所述目标帧图像为待模糊处理的图像;模糊处理模块,用于基于所述关联帧图像和所述运动趋势,对所述目标帧图像进行模糊处理,得到所述目标帧图像对应的模糊帧图像;视频生成模块,用于基于所述模糊帧图像生成所述目标视频对应的运动模糊视频。
第三方面,本公开实施例还提供了一种电子设备,所述电子设备包括:处理器;用于存储所述处理器可执行指令的存储器;所述处理器,用于从所述存储器中读取所述可执行指令,并执行所述指令以实现如本公开实施例提供的视频处理方法。
第四方面,本公开实施例还提供了一种非瞬态的计算机可读存储介质,所述存储介质存储有计算机程序,所述计算机程序用于执行如本公开实施例提供的视频处理方法。
第五方面,本公开实施例还提供了一种计算机程序,所述计算机程序被处理器执行时实现如本公开实施例提供的视频处理方法。
应当理解,本部分所描述的内容并非旨在标识本公开的实施例的关键或重要特征,也不用于限制本公开的范围。本公开的其它特征将通过以下的说明书而变得容易理解。
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。
为了更清楚地说明本公开实施例或相关技术中的技术方案,下面将对实施例或相关技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本公开实施例提供的一种视频处理方法的流程示意图;
图2为本公开实施例提供的一种运动模糊方向示意图;
图3为本公开实施例提供的一种运动模糊方法的流程示意图;
图4为本公开实施例提供的另一种运动模糊方法的流程示意图;
图5为本公开实施例提供的一种视频的送帧出帧示意图;
图6为本公开实施例提供的一种视频处理装置的结构示意图;
图7为本公开实施例提供的一种电子设备的结构示意图。
为了能够更清楚地理解本公开的上述目的、特征和优点,下面将对本公开的方案进行进一步描述。需要说明的是,在不冲突的情况下,本公开的实施例及实施例中的特征可以相互组合。
在下面的描述中阐述了很多具体细节以便于充分理解本公开,但本公开还可以采用其他不同于在此描述的方式来实施;显然,说明书中的实施例只是本公开的一部分实施例,而不是全部的实施例。
发明人经研究发现,现有软件提供的运动模糊特效所呈现的表现形式单一,运动模糊效果不佳,大多难以使用户满意。
本公开实施例提供的技术方案,能够基于用户设置的运动模糊信息获取目标视频中的待模糊处理的目标帧图像和关联帧图像之间的运动趋势,并基于关联帧图像和运动趋势对目标帧图像进行模糊处理,进而基于目标帧图像对应的模糊帧图像生成运动模糊视频。上述方式有助于使运动模糊视频达到更为真实连贯的运动模糊效果,且并非采用固定参数进行运动模糊处理,而是基于用户设置的运动模糊信息对目标视频进行模糊处理,用户可以根据自身需求进行运动模糊信息的个性化设置,不同的运动模糊信息可以形成表现形式丰富的多种模糊效果,从而使得最终所得的运动模糊视频更符合用户需求。
发明人经研究发现,现有软件提供的运动模糊特效的主要实现方式有如下两种:1)预先设置固定的运动方向和模糊强度等参数,无论是何种视频,都采用预设参数进行运动模糊处理,属于静态型模糊处理方式。2)基于被摄主体的运动方向确定运动模糊渲染的方向,以及基于被摄主体的运动快慢匹配运动模糊渲染的强度,以此使视频带来运动模糊效果。对于第一种方式而言,所得的运动模糊视频的表现形式单一,效果较差,难以满足用户需求。对于第二种而言,虽然与第一种的方式相比有所改进,可以基于待模糊处理的原始视频中的主体运动模糊方向确定模糊渲染方向,以及根据主体运动快慢确定模糊渲染强度,但是对于一种原始视频而言,所得的运动模糊效果也是固定的,仍旧存在表现形式单一的问题,且根据原始视频而确定的模糊渲染方向及模糊渲染强度可能并非是用户所需的,因此也难以较好地满足用户需求。
针对相关技术中的运动模糊方案所存在的上述缺陷是申请人在经过实践并仔细研究后得出的结果,因此,上述缺陷的发现过程以及在下文中本申请实施例针对上述缺陷所提出的解决方案,都应该被认定为申请人对本申请做出的贡献。
为了改善以上问题,本公开实施例提供了一种视频处理方法、装置、设备及介质,以下进行详细阐述说明。
图1为本公开实施例提供的一种视频处理方法的流程示意图,该方法可以由视频处理装置执行,其中该装置可以采用软件和/或硬件实现,一般可集成在电子设备中。如图1所示,该方法主要包括如下步骤S102~步骤S108:
步骤S102,响应于接收到用户针对目标视频发起的运动模糊请求,获取用户设置的运动模糊信息。
运动模糊信息用于指示模糊处理方式,诸如指示对目标视频中的视频帧进行运动模糊的具体模式、模糊程度等方式。本公开实施例对运动模糊信息所包含的具体内容不进行限制,在运动模糊处理所需的关键信息均可由用户设置,在一些具体的实施示例中,运动模糊信息可以包括运动模糊模式和模糊程度,进一步,还可以包含融合程度等。在实际应用中,可以在客户端界面上为用户提供可设置运动模糊信息的一个或多个设置项,以便于用户根据需求设置所需的信息,诸如,针对运动模糊模式、模糊程度和融合程度分别设置相应的设置项,以便用户可以根据需求灵活设置所需的运动模糊信息。
在一些实施示例中,运动模糊模式包括双向模式、单向模式;其中,单向模式可以进一步划分为前导模式和拖影模式,不同的运动模糊模式所对应的待处理的帧图像组合不同,示例性地,对于同一目标帧图像而言,不同的运动模糊模式所选取的目标帧图像的关联帧图像不同,所得的效果也不相同。诸如,在客户端界面上可以为用户提供双向模式、前导模式和拖影模式三种选项,对于双向模式,目标帧图像的前后帧图像均为关联帧图像,对于前导模式,目标帧图像的前一帧图像作为关联帧图像,对于拖影模式,目标帧图像的后一帧图像作为关联帧图像,相应的,基于关联帧图像对目标帧图像进行模糊处理所得的效果则不同。模糊程度可采用数值范围进行划分,也可以采用等级划分;诸如,在客户端界面上可以为用户提供0~100的模糊区间,数值越小,模糊程度越低;又诸如,可以为用户提供0~10的模糊等级,等级越小,模糊程度越低。同理,融合程度也可采用上述方式划分,在此不再赘述。以上仅为示例性说明,不应当被视为限制。
步骤S104,根据运动模糊信息对目标视频中的目标帧图像与目标帧图像的关联帧图像进行帧间运动估计,得到目标帧图像和关联帧图像之间的运动趋势;其中,目标帧图像为待模糊处理的图像。
在实际应用中,目标帧图像以及相应的关联帧图像主要取决于运动模糊模式,在一些实施方式中,可首先根据运动模糊模式确定目标视频中的目标帧图像以及相应的关联帧图像,之后再对目标帧图像和关联帧图像进行帧间运动估计,以此来评估目标帧图像和关联
帧图像之间的运动趋势。在一些实施示例中,运动趋势可采用运动向量(也即光流)表征。为便于理解,可参照图2所示的一种运动模糊方向示意图,共示意出在前帧(帧L-1)、中间帧(帧L)和在后帧(帧L+1),以中间帧是目标帧图像为例,倘若基于帧L-1对帧L进行运动模糊处理,则为前导模式;基于帧L+1对帧L进行模糊处理,则为拖影模式,同时基于帧L-1与帧L+1对帧L进行模糊处理,则为双向模式。在实际应用中可以根据用户设置的运动模糊模式确定目标帧图像的关联帧图像的选取方向,对目标帧图像与目标帧图像的关联帧图像进行运动趋势估计,在满足用户需求的情况下,通过帧间运动估计的方式也有助于使后续所得的运动模糊视频产生较为真实的运动模糊效果,并提升帧间的连贯性。
在实际应用中,目标视频中除了诸如首帧/末帧等个别帧可能会因运动模糊模式的影响而无法作为目标帧图像,其余帧图像均可作为待模糊处理的目标帧图像,且运动模糊模式不同,目标帧图像的关联帧图像也不同。
步骤S106,基于关联帧图像和运动趋势,对目标帧图像进行模糊处理,得到目标帧图像对应的模糊帧图像。在运动模糊信息包括模糊程度的情况下,可以进一步基于关联帧图像、运动趋势和模糊程度,对目标帧图像进行模糊处理,得到目标帧图像对应的模糊帧图像。模糊程度不同,做得到的模糊帧图像的模糊效果也不同。
在一些实施方式中,可以基于路径插值方式对目标帧图像进行模糊处理,诸如,将每个像素点在关联帧图像与目标帧图像之间的运动路径上进行多次采样,得到多个像素采样值,然后将每个像素点对应的多个像素采样值以及目标帧图像上的原始像素值进行融合处理,以此得到目标帧图像对应的模糊帧图像。且在模糊处理过程中,可以基于模糊程度调节模糊帧图像的模糊效果。
步骤S108,基于模糊帧图像生成目标视频对应的运动模糊视频。
在一些实施示例中,可以直接将得到的各目标帧图像对应的模糊帧图像按照时间顺序排序,以此得到目标视频对应的运动模糊视频;在另一些实施示例中,还可以对模糊帧图像进行后处理,将后处理后的模糊帧图像按照时间顺序排序,以此得到目标视频对应的运动模糊视频。另外,在实际应用中,目标视频中诸如首帧/末帧等其它未经模糊处理的图像可以不进行处理,并与各模糊帧图像按序排列生成运动模糊视频,诸如,运动模糊视频的首帧图像仍为目标视频的首帧图像,而运动模糊视频的其余帧图像均为目标视频中其余各帧图像对应的模糊帧图像。
上述方式所得的运动模糊视频能够达到更为真实连贯的运动模糊效果,且并非采用固定参数进行运动模糊处理,而是基于用户设置的运动模糊信息对目标视频进行模糊处理,用户可以根据自身需求进行运动模糊信息的个性化设置,不同的运动模糊信息可以形成表现形式丰富的多种模糊效果,从而使得最终所得的运动模糊视频更符合用户需求。
进一步,在运动模糊信息包括运动模糊模式的基础上,本公开实施例给出了根据运动模糊信息对目标视频中的目标帧图像与目标帧图像的关联帧图像进行帧间运动估计的具体实施方式,可参照如下步骤A~步骤C实现:
步骤A,根据运动模糊模式确定目标视频中的待模糊帧图像,并将待模糊帧图像作为目标帧图像。具体而言,可参照如下三种情况实现:
在运动模糊模式为双向模式的情况下,将目标视频中除首帧图像和末帧图像之外的其它帧图像作为目标视频中的待模糊帧图像。在一些实施示例中,可以将除首帧图像和末帧图像之外的其它每帧图像均作为待模糊帧图像,在另一些实施示例中,也可以将除首帧图像和末帧图像之外的其它指定帧图像作为待模糊帧图像,具体可根据需求灵活设置,在此不进行限制。可以理解的是,在双向模式时,待模糊帧图像需要借助前后两帧图像进行模糊处理,因此可以选取除首帧图像和末帧图像之外的其它帧图像作为目标帧图像。也即,目标视频中的首末两帧图像均无法进行双向模糊处理。
在运动模糊模式为前导模式的情况下,将目标视频中除首帧图像之外的其它帧图像作为目标视频中的待模糊帧图像。在一些实施示例中,可以将除首帧图像之外的其它每帧图像均作为待模糊帧图像,在另一些实施示例中,也可以将除首帧图像之外的其它指定帧图像作为待模糊帧图像,具体可根据需求灵活设置,在此不进行限制。可以理解的是,在运动模糊模式为前导模式时,待模糊帧图像需要借助前一帧图像进行模糊处理,因此可以选取除首帧图像之外的其它帧图像作为目标帧图像。也即,目标视频中的首帧图像无法进行前向模糊处理。
在运动模糊模式为拖影模式的情况下,将目标视频中除末帧图像之外的其它帧图像作为目标视频中的待模糊帧图像。在一些实施示例中,可以将除末帧图像之外的其它每帧图像均作为待模糊帧图像,在另一些实施示例中,也可以将除末帧图像之外的其它指定帧图像作为待模糊帧图像,具体可根据需求灵活设置,在此不进行限制。可以理解的是,在运动模糊模式为拖影模式时,待模糊帧图像需要借助后一帧图像进行模糊处理,因此可以选
取除末帧图像之外的其它帧图像作为目标帧图像。也即,目标视频中的末帧图像无法进行后向模糊处理。
通过上述基于运动模糊模式确定待模糊处理的目标帧图像的方式较为合理,而且也切合实际情况。
步骤B,根据运动模糊模式确定目标帧图像在目标视频中的关联帧图像。具体而言,也可参照如下三种情况实现:
在运动模糊模式为双向模式的情况下,将目标帧图像的前一帧图像和后一帧图像作为目标帧图像的关联帧图像。
在运动模糊模式为前导模式的情况下,将目标帧图像的前一帧图像作为目标帧图像的关联帧图像。
在运动模糊模式为拖影模式的情况下,将目标帧图像的后一帧图像作为目标帧图像的关联帧图像。
通过上述基于运动模糊模式确定目标帧图像的关联帧图像的方式更为可靠,后续基于目标帧图像的关联帧图像对目标帧图像进行模糊处理,从而达到用户所需的运动模糊形式。
步骤C,采用预设的光流算法对目标帧图像与关联帧图像进行帧间运动估计。
本公开实施例对光流算法不进行限定,示例性的,预设的光流算法可采用稠密光流算法,进一步,可基于DIS光流算法对目标帧图像与关联帧图像进行帧间运动估计。DIS光流算法是Dense Inverse Search-based method(基于稠密逆搜索的方法)的简称,具体而言,DIS算法是把图像缩放到不同的尺度,构建一个图像金字塔,然后从最小分辨率的一层开始,逐层向下估计光流(也即,运动向量),每一层估计得到的光流会作为下一层估计的初始化,从而达到准确估计不同幅度的运动的目的。在实际应用中,可以直接采用原有DIS光流算法对目标帧图像与关联帧图像进行帧间运动估计,也可以在原有DIS光流算法的基础上进行改进,采用改进后的DIS光流算法对目标帧图像与关联帧图像进行帧间运动估计。在本公开实施例中,为了降低计算成本,给出了基于改进后的DIS光流算法对目标帧图像与关联帧图像进行帧间运动估计的方式,可参照步骤C1~步骤C4实现:
步骤C1,将目标帧图像和关联帧图像分别执行下采样处理。示例性地,可以将目标帧图像和关联帧图像均下采样至1/2分辨率,通过降低图像分辨率的方式有助于提升后续DIS光流算法的图像处理效率以及降低算法的计算成本。
步骤C2,基于改进后的DIS光流算法对下采样后的目标帧图像和下采样后的关联帧图像进行帧间运动估计,得到第一运动向量;其中,改进后的DIS光流算法所采用的迭代次数小于原有DIS光流算法所采用的迭代次数。本公开实施例对DIS光流算法进行简化,在使用梯度下降迭代优化求解时,可降低原有DIS光流算法所采用的迭代次数,示例性地,申请人经研究发现,将原有的DIS光流算法的12次迭代改为5次迭代,也可以较好地保证光流准确性,与此同时还可以较好地降低计算成本。应当说明的是,对于双向模式而言,目标帧图像的关联帧图像为前后两帧图像,因此需要分别针对在前帧图像与目标帧图像之间进行运动估计,以及目标帧图像与在后帧图像之间进行运动估计,得到的第一运动向量包括前向运动向量(前向光流)和后向运动向量(后向光流)。对于单向模式(包括前导模式和拖影模式)而言,第一运动向量只为前向运动向量或者后向运动向量,在此不再赘述。
步骤C3,对第一运动向量执行上采样操作,得到第二运动向量。经过简化的DIS光流算法得到第一运动向量,该第一运动向量实质为下采样1/2后图像的光流,相当于原图中每2*2个像素的稀疏光流,为了获得每个像素的光流,可以再采用对第一运动向量进行上采样的方式获取第二运动向量,也即可得到原图的稠密光流。
步骤C4,基于第二运动向量得到目标帧图像和关联帧图像之间的运动向量。
在一些实施示例中,可以对第二运动向量进行均值模糊处理,并将均值模糊处理后的第二运动向量作为目标帧图像和关联帧图像之间的运动向量。示例性地,可以采用9*9大小的核对第二运动向量进行均值模糊。通过这种方式,可以有效去除光流计算的块效应,弱化块边缘,减少后续插值出现的块扭曲现象,增强运动模糊效果。当然,在实际应用中,也可以直接将第二运动向量作为目标帧图像和关联帧图像之间的运动向量,这种方式则更为方便快捷。具体可根据需求灵活选择上述方式,在此不进行限制。
综上,通过上述步骤C1~步骤C4,可以有效保障运动趋势的预估准确性,而且所需计算成本较低。
进一步,本公开实施例还可以为用户提供形变模糊功能的可选项,也即能够在运动模糊处理过程中融入形变模糊效果。具体而言,在一些实施方式中,运动模糊信息还包括形变模糊功能的状态,该状态包括开启状态或关闭状态;基于此,在基于关联帧图像、运动趋势和模糊程度,对目标帧图像进行模糊处理时,可以根据形变模糊功能的状态,基于关联帧图像、运动趋势和模糊程度,对目标帧图像进行模糊处理。在形变模糊功能处于关闭状态时,可以仅基于关联帧图像、运动趋势和模糊程度,对目标帧图像进行模糊处理;而
在形变模糊功能处于开启状态时,在指定条件触发下可以在运动模糊处理过程中融入形变模糊效果,示例性地,该指定条件可以为目标帧图像属于转场帧图像,或者目标视频为幻灯片形式视频等。通过上述方式,有助于在运动模糊处理过程中融入形变模糊效果,尤其对于转场视频或者幻灯片形式视频而言,通过融入形变模糊效果,可以使最终所得的运动模糊效果更为流畅自然。
为便于理解,本公开实施例给出了根据形变模糊功能的状态,基于关联帧图像、运动趋势和模糊程度,对目标帧图像进行模糊处理的具体实现方式,可参照如下步骤1和步骤2a或步骤2b实现:
步骤1,在形变模糊功能的状态为开启状态的情况下,判断目标帧图像与关联帧图像之间的图像内容是否相关。
本公开实施例充分考虑到在两帧图像之间的图像内容没有关联性的情况下(诸如转场视频或幻灯片形式视频),直接对两帧图像进行运动估计所得的运动向量的可靠性较差,容易导致模糊后的图像过分扭曲,因此可以首先对帧间图像的内容相关性进行判别,在不相关的情况下可对关联帧图像进行形变模糊,以此进行帧间过渡衔接,提升帧间连贯性。
进一步,本公开实施例给出了判断目标帧图像与关联帧图像之间的图像内容是否相关的具体实现方式:可以基于预设的SAD算法获取目标帧图像与关联帧图像之间的SAD值;然后根据SAD值以及预设阈值判断目标帧图像与关联帧图像之间的图像内容是否相关。
其中,SAD(Sum of absolute differences,绝对误差和)算法是一种图像立体匹配中的初级块匹配算法,其基本运算思想是求取相对应的左右两个像素块内像素值之差的绝对值之和,具体算法可参照相关技术实现,在此不再赘述。本公开实施例利用SAD算法可以有效客观地衡量两帧图像之间的内容相关性。在一些实施方式中,可以直接设置预设阈值,如果两帧图像之间的SAD值大于预设阈值,则认为目标帧图像与关联帧图像的图像内容不相关,也即发生了转场或者幻灯片图像切换。在另一些实施方式中,可基于三帧图像进行判别,对于前帧(帧L-1)、中间帧(帧L)和在后帧(帧L+1)而言,可以首先计算帧L-1和帧L之间的第一SAD值以及帧L和帧L+1之间的第二SAD值,然后计算第一SAD值和第二SAD值之间的SAD差值,如果第一SAD值、第二SAD值和SAD差值中的最小值大于预设阈值,则认为目标帧图像与关联帧图像之间出现了转场或者幻灯片切换,也即目标帧图像与关联帧图像之间的图像内容不相关。通过上述方式,可以合理客观地对两帧图像之间的内容相关性进行判别,得到更为准确的判别结果。
步骤2a,如果目标帧图像与关联帧图像之间的图像内容相关,则基于关联帧图像、运动趋势和模糊程度,对目标帧图像进行模糊处理。
也即,如果目标帧图像与关联帧图像之间的图像内容相关,则无需再采用形变模糊,直接按照原有帧图像进行模糊处理即可,方便快捷,且可以达到较好的运动模糊效果。
步骤2b,如果目标帧图像与关联帧图像之间的图像内容不相关,则对关联帧图像进行形变模糊处理,并基于形变模糊处理后的关联帧图像、运动趋势和模糊程度,对目标帧图像进行模糊处理。
由于通常情况下对不相关的两帧图像之间的运动趋势的估计可靠性很差,基于估测所得的运动向量也会导致运动模糊视频中的图像过分扭曲,为改善此问题,可以在目标帧图像与关联帧图像之间的图像内容不相关的情况下,对关联帧图像进行形变模糊处理,示例性地,可以采用随机投射变换的方式对关联帧图像进行形变模糊处理,具体形变模糊处理的方式在此不进行限制。
通过上述方式可以有效降低模糊帧图像的扭曲程度,使运动模糊视频更为真实。
在实际应用中,运动趋势以运动向量(即为光流)的形式表征;在此基础上,基于关联帧图像、运动趋势和模糊程度,对目标帧图像进行模糊处理,得到目标帧图像对应的模糊帧图像的步骤,在一些实施方式中,可基于关联帧图像、运动趋势和模糊程度进行路径插值,并根据路径插值结果(在运动路径上多次采样,得到多个像素点采样值)对目标帧图像进行模糊处理,具体而言,可以参照如下步骤a~步骤c实现:
步骤a,基于模糊程度对目标帧图像和关联帧图像之间的运动向量进行调整,得到调整后的运动向量。
在一些实施示例中,可以根据模糊程度确定用于调整目标帧图像和关联帧图像之间的运动向量的比例系数;然后令比例系数与目标帧图像和关联帧图像之间的运动向量相乘,得到调整后的运动向量。具体而言,模糊程度可以用于改变光流算法进行运动估计所得的运动向量(或光流值),然后再利用改变后的运动向量进行后续模糊处理。诸如,模糊程度为0~100,可对应比例系数0~1,如果用户设置模糊程度是0(也即对应比例系数为0),则运动估计所得的光流值为0,因此不会进行模糊处理,也即最终所得的运动模糊视频与原有视频实质是一致的;如果用户设置模糊程度是100(也即对应比例系数为1),则运动估计所得的运动向量不会改变,也即完全按照光流算法计算所得的运动向量对目标帧图像进
行模糊处理,得到模糊程度最大的运动模糊效果。而用户设置的模糊程度在0~100期间,则会根据模糊程度的具体值来按比例弱化最终的运动模糊效果。
另外,还可以将模糊程度设置为诸如0~300等,如果用户选择的模糊程度值超出100,则会进一步夸大模糊效果,最终呈现为扭曲特效,诸如,模糊程度值200对应的比例系数是2,模糊程度值300对应的比例系数是3等,仍旧按照上述方式,在光流算法输出的运动向量与比例系数(2、3等)相乘,之后再基于调整后的运动向量进行路径插值等处理,便可得到较为夸张的扭曲模糊效果,通过为用户提供范围较大的模糊程度区间,可以满足用户多元化的编辑需求。
步骤b,获取调整后的运动向量对应的像素点采样次数。
在本公开实施例中,可以基于调整后的运动向量的长度,获取像素点采样次数;其中,长度与像素点采样次数为正相关。这种方式能够实现自适应采样,可以有效节约计算成本。在一些实施方式中,还可以沿着运动向量按照等距离采样的方式确定像素点采样次数,两个采样点之间的间隔距离可根据需求进行设置。
在相关技术中,无论运动向量的长短,均采用固定采样次数,对于长度较短的运动向量而言,则容易出现采样冗余,浪费算力的情况,也即会浪费不必要的采样成本。对于长度较长的运动向量而言,则容易出现采样次数不够的情况,使生成的模糊帧图像上会出现较为明显的重叠痕迹。而本公开实施例采用的上述基于运动向量的长度来获取采样次数的自适应方式,可以更为合理的确定采样次数,并较好保障采样结果的可靠性。
步骤c,根据像素点采样次数和调整后的运动向量,对目标帧图像进行模糊处理,得到目标帧图像对应的模糊帧图像。在一些实施示例中,可参照如下步骤c1~步骤c3实现:
步骤c1,对于目标帧图像上的每个像素点,根据像素点采样次数获取该像素点在调整后的运动向量上对应的多个像素采样值;诸如可以基于像素点采样次数进行等距离采样,得到多个像素采样值。
步骤c2,将目标帧图像上的每个像素点的原始像素值以及每个像素点对应的多个像素采样值进行累加平均处理,得到每个像素点对应的综合像素值;
步骤c3,基于每个像素点对应的综合像素值生成目标帧图像对应的模糊帧图像。
也即,通过上述步骤c1~步骤c3,可以将每个像素在两帧图像之间的运动路径上按照等距离采用的方式进行累加平均处理,以此可以制造平滑的运动模糊效果。
综上,通过上述步骤a~步骤c所提供的基于自适应采样策略对目标帧图像进行模糊处理的方式,在保证所得的模糊效果自然细腻的同时,也可有效降低运算成本。
为了进一步丰富运动模糊效果,运动模糊信息还包括融合程度,本公开实施例还可以为用户提供融合程度的设置项,用户可以根据需求设置融合程度的参数,因此还可以获取用户设置的融合程度,在基于模糊帧图像生成目标视频对应的运动模糊视频时,可以基于融合程度,将模糊帧图像与关联帧图像进行融合,得到融合帧图像,最后按照时间顺序将每个模糊帧图像对应的融合帧图像进行排列,生成目标视频对应的运动模糊视频。上述方式又可称为融合后处理算法,上述融合程度实质为重影程度,通过将模糊帧图像与关联帧图像进行融合,可达到一种重影的效果,同样,诸如可设置融合程度为0~100,对应融合比例0~1,如果融合程度是0,则相当于不对模糊帧图像与关联帧图像进行融合,输出的融合帧图像实质仍为模糊帧图像,而融合程度为100,则输出的融合帧图像的重影效果最为强烈。在实际应用中,可以基于融合程度对应的融合比例将两帧图像中的像素点进行加权处理,以此来得到融合帧图像,具体可参照相关技术实现,在此不再赘述。通过上述方式,还可以为用户提供的运动模糊效果中呈现出重影效果,使运动模糊效果更为丰富,满足用户的多元化需求,如果用户不需要重影,则直接将融合程度设置为0即可。
在前述基础上,本公开实施例还提供了如图3所示的一种运动模糊方法的流程示意图,主要包括如下步骤S302~步骤S314:
步骤S302,输入目标帧图像和关联帧图像。
步骤S304,判断帧间图像内容是否相关(也即判别是否发生帧间转场/幻灯片形式切换等情况),如果是,执行步骤S306,如果否,执行步骤S308;
步骤S306,判断是否开启形变模糊功能。如果是,执行步骤S310,如果否,执行步骤S308。
步骤S308,基于稠密光流算法对关联帧图像和目标帧图像进行运动估计,之后执行步骤S312。
步骤S310,对关联帧图像进行透射变换处理,并基于稠密光流算法对处理后的关联帧图像和目标帧图像进行运动估计。
步骤S312,基于自适应的路径插值算法对目标帧图像进行运动模糊处理。
步骤S314,输出目标帧图像对应的模糊帧图像。
上述步骤的具体实现方式可参照前述相关内容,在此不再赘述。通过帧间内容相关性判别的方式可以有效避免转场视频或幻灯片形式视频进行运动模糊导致的扭曲失真等问题,在内容不相关且用户开启形变模糊功能的情况,可以对关联帧图像进行投射变换等形变模糊处理,以此尽可能保障运动模糊效果更为流畅自然。并且,通过自适应的路径插值算法对目标帧图像进行模糊处理的方式,在保证所得的模糊效果自然细腻的同时,也可有效降低运算成本。综上所得的模糊帧图像有助于使最终的运动模糊视频达到更为真实连贯的运动模糊效果。
应当说明的是,每个目标帧图像均可采用上述步骤获得模糊帧图像,后续可直接基于各模糊帧图像组合生成运动模糊视频。
在图3基础上,本公开实施例还提供了如图4所示的一种运动模糊方法的流程示意图,主要包括如下步骤S402~步骤S416:
步骤S402,输入目标帧图像和关联帧图像。
步骤S404,判断帧间图像内容是否相关(也即判别是否发生帧间转场/幻灯片形式切换等情况),如果是,执行步骤S406,如果否,执行步骤S408;
步骤S406,判断是否开启形变模糊功能。如果是,执行步骤S410,如果否,执行步骤S408。
步骤S408,基于稠密光流算法对关联帧图像和目标帧图像进行运动估计,之后执行步骤S412。
步骤S410,对关联帧图像进行透射变换处理,并基于稠密光流算法对处理后的关联帧图像和目标帧图像进行运动估计。
步骤S412,基于自适应的路径插值算法对目标帧图像进行运动模糊处理。
步骤S414,基于关联帧图像对目标帧图像对应的模糊帧图像进行融合后处理。
步骤S416,输出目标帧图像对应的经融合后处理的模糊帧图像。
上述步骤S402~步骤S412等同于前述图3中的步骤S302~步骤S312,相关效果在此不再赘述。图4重点在于可以额外对模糊帧图像进行融合后处理,以此来增加重影效果,进一步丰富了运动模糊效果的表现形式,满足用户的多元化编辑需求。
在实际应用中,本公开实施例还给出了如图5所示的一种视频的送帧出帧示意图,输入帧为X1、X2、X3、X4、X5……Xn-1、Xn;输出帧为Y1、Y2、Y3、Y4、Y5……Yn-1、
Yn。在该示例中,输出帧的数量完全等于输入帧的数量,也即,运动模糊视频的帧数与原始的目标视频的帧数相同。
在一些实施方式中,X1与Y1相对应、X2与Y2相对应(诸如X2的模糊帧图像为Y2),X3与Y3相对应,以此类推,该实施方式也为理论方式,能够直接获取到所需帧的场景下可适用于上述方式。诸如,可以首先获取到视频中的所有帧,然后对每个待模糊处理的帧图像采用本公开实施例提供的前述运动模糊处理方式得到模糊帧图像,之后再组合形成运动模糊视频。
而在实际应用中,考虑到部分处理场景下只能从视频中逐个获取视频帧并进行处理,无法提前获取在后帧,因此可采用错位方式实现。诸如,以双向运动模糊为例,对于X2是目标帧图像而言,需要X1和X3作为关联帧图像,对于X3是目标帧图像而言,需要X2和X4作为关联帧图像,但在获取到X2时,无法直接获取到X3,则可以只基于X1对X2进行前导模糊,得到Y2;在获取到X3时,无法直接获取到X4,目前只有X1~X3,此时可基于X1和X3对X2进行双向模糊,得到X2对应的模糊帧图像X2’,此时可错位将X2’作为运动模糊视频的第三帧Y3,依次类推直至获取到Xn,可以基于Xn对Xn-1进行拖影模糊,将Xn-1’作为Yn。另外,在图5中示例出X1不进行处理,直接复制即可得到Y1。图5即为上述错位方式的一种示例,但不应当被视为限制,诸如对于最后一帧Yn,也可以基于Xn-2和Xn对Xn-1进行双向模糊,将所得的Xn-1’作为Yn,或者,还可以仅是复制Xn,将复制后的Xn作为Yn。以上均为示例性说明,对于首帧/末帧可根据需求灵活选择相应的处理方式,在此不进行限制。
综上所述,与前述相关技术相比,本公开实施例提供的视频处理方法,并非采用固定参数进行运动模糊处理,而是基于用户设置的运动模糊信息对目标视频进行模糊处理,不同运动模糊模式和不同模糊程度可以形成表现形式丰富的多种模糊效果。而且可以进一步为用户提供形变模糊功能设置项和融合程度设置项,根据帧间的内容关联性提供形变模糊效果以及重影效果,不仅所得的运动模糊效果更为丰富,而且也适用于诸如转场视频、幻灯片形式视频等特殊视频,适用范围更广泛。另外,在对目标帧图像进行模糊处理时,基于自适应的路径插值算法及简化的光流算法能够在一定程度上保证运动模糊效果较佳的同时也可有效降低运算成本,便于实现实时渲染,在计算机或移动终端均可适用。综上所得的运动模糊视频可达到更为真实连贯的运动模糊效果,且更符合用户的多元化需求。
对应于前述视频处理方法,本公开实施例还提供了一种视频处理装置,图6为本公开实施例提供的一种视频处理装置的结构示意图,该装置可由软件和/或硬件实现,一般可集成在电子设备中,如图6所示,包括:
参数获取模块602,用于响应于接收到用户针对目标视频发起的运动模糊请求,获取用户设置的运动模糊信息;其中,所述运动模糊信息用于指示模糊处理方式;
运动估计模块604,用于根据运动模糊信息对目标视频中的目标帧图像与目标帧图像的关联帧图像进行帧间运动估计,得到目标帧图像和关联帧图像之间的运动趋势;其中,目标帧图像为待模糊处理的图像;
模糊处理模块606,用于基于关联帧图像和运动趋势,对目标帧图像进行模糊处理,得到目标帧图像对应的模糊帧图像;
视频生成模块608,用于基于模糊帧图像生成目标视频对应的运动模糊视频。
上述装置所得的运动模糊视频能够达到更为真实连贯的运动模糊效果,且并非采用固定参数进行运动模糊处理,而是基于用户设置的运动模糊信息对目标视频进行模糊处理,用户可以根据自身需求进行运动模糊信息的个性化设置,不同的运动模糊信息可以形成表现形式丰富的多种模糊效果,从而使得最终所得的运动模糊视频更符合用户需求。
在一些实施方式中,所述运动模糊信息包括运动模糊模式,运动估计模块604具体用于:根据所述运动模糊模式确定所述目标视频中的待模糊帧图像,并将所述待模糊帧图像作为目标帧图像;根据所述运动模糊模式确定所述目标帧图像在所述目标视频中的关联帧图像;采用预设的光流算法对所述目标帧图像与所述关联帧图像进行帧间运动估计。
在一些实施方式中,运动估计模块604具体用于:在所述运动模糊模式为双向模式的情况下,将所述目标视频中除首帧图像和末帧图像之外的其它帧图像作为所述目标视频中的待模糊帧图像;在所述运动模糊模式为前导模式的情况下,将所述目标视频中除首帧图像之外的其它帧图像作为所述目标视频中的待模糊帧图像,在所述运动模糊模式为拖影模式的情况下,将所述目标视频中除末帧图像之外的其它帧图像作为所述目标视频中的待模糊帧图像。
在一些实施方式中,运动估计模块604具体用于:在所述运动模糊模式为双向模式的情况下,将所述目标帧图像的前一帧图像和后一帧图像作为所述目标帧图像的关联帧图像;在所述运动模糊模式为前导模式的情况下,将所述目标帧图像的前一帧图像作为所述目标
帧图像的关联帧图像;在所述运动模糊模式为拖影模式的情况下,将所述目标帧图像的后一帧图像作为所述目标帧图像的关联帧图像。
在一些实施方式中,运动估计模块604具体用于:将所述目标帧图像和所述关联帧图像分别执行下采样处理;基于改进后的DIS光流算法对下采样后的所述目标帧图像和下采样后的所述关联帧图像进行帧间运动估计,得到第一运动向量;其中,所述改进后的DIS光流算法所采用的迭代次数小于原有DIS光流算法所采用的迭代次数;对所述第一运动向量执行上采样操作,得到第二运动向量;基于所述第二运动向量得到所述目标帧图像和所述关联帧图像之间的运动向量。
在一些实施方式中,运动估计模块604具体用于:对所述第二运动向量进行均值模糊处理,并将均值模糊处理后的所述第二运动向量作为所述目标帧图像和所述关联帧图像之间的运动向量。
在一些实施方式中,所述运动模糊信息包括模糊程度;模糊处理模块606具体用于:基于所述关联帧图像、所述运动趋势和所述模糊程度,对所述目标帧图像进行模糊处理。
在一些实施方式中,所述运动模糊信息还包括形变模糊功能的状态;所述状态包括开启状态或关闭状态;模糊处理模块606具体用于:根据所述形变模糊功能的状态,基于所述关联帧图像、所述运动趋势和所述模糊程度,对所述目标帧图像进行模糊处理。
在一些实施方式中,模糊处理模块606具体用于:在所述形变模糊功能的状态为开启状态的情况下,判断所述目标帧图像与所述关联帧图像之间的图像内容是否相关;如果所述目标帧图像与所述关联帧图像之间的图像内容相关,则基于所述关联帧图像、所述运动趋势和所述模糊程度,对所述目标帧图像进行模糊处理;如果所述目标帧图像与所述关联帧图像之间的图像内容不相关,则对所述关联帧图像进行形变模糊处理,并基于形变模糊处理后的所述关联帧图像、所述运动趋势和所述模糊程度,对所述目标帧图像进行模糊处理。
在一些实施方式中,模糊处理模块606具体用于:基于预设的SAD算法获取所述目标帧图像与所述关联帧图像之间的SAD值;根据所述SAD值以及预设阈值判断所述目标帧图像与所述关联帧图像之间的图像内容是否相关。
在一些实施方式中,所述运动趋势以运动向量的形式表征;模糊处理模块606具体用于:基于所述模糊程度对所述目标帧图像和所述关联帧图像之间的运动向量进行调整,得到调整后的运动向量;获取所述调整后的运动向量对应的像素点采样次数;根据所述像素
点采样次数和所述调整后的运动向量,对所述目标帧图像进行模糊处理,得到所述目标帧图像对应的模糊帧图像。
在一些实施方式中,模糊处理模块606具体用于:根据所述模糊程度确定用于调整所述目标帧图像和所述关联帧图像之间的运动向量的比例系数;令所述比例系数与所述目标帧图像和所述关联帧图像之间的运动向量相乘,得到调整后的运动向量。
在一些实施方式中,模糊处理模块606具体用于:基于所述调整后的运动向量的长度,获取像素点采样次数;其中,所述长度与所述像素点采样次数为正相关。
在一些实施方式中,模糊处理模块606具体用于:对于所述目标帧图像上的每个像素点,根据所述像素点采样次数获取该像素点在所述调整后的运动向量上对应的多个像素采样值;将所述目标帧图像上的每个像素点的原始像素值以及每个像素点对应的多个像素采样值进行累加平均处理,得到每个像素点对应的综合像素值;基于每个像素点对应的综合像素值生成所述目标帧图像对应的模糊帧图像。
在一些实施方式中,所述运动模糊信息还包括融合程度;在此基础上,视频生成模块608具体用于:基于所述融合程度,将所述模糊帧图像与所述关联帧图像进行融合,得到融合帧图像;按照时间顺序将每个所述模糊帧图像对应的融合帧图像进行排列,生成所述目标视频对应的运动模糊视频。
本公开实施例所提供的视频处理装置可执行本公开任意实施例所提供的视频处理方法,具备执行方法相应的功能模块和有益效果。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的装置实施例的具体工作过程,可以参考方法实施例中的对应过程,在此不再赘述。
图7为本公开实施例提供的一种电子设备的结构示意图。如图7所示,电子设备700包括一个或多个处理器701和存储器702。
处理器701可以是中央处理单元(CPU)或者具有数据处理能力和/或指令执行能力的其他形式的处理单元,并且可以控制电子设备700中的其他组件以执行期望的功能。
存储器702可以包括一个或多个计算机程序产品,所述计算机程序产品可以包括各种形式的计算机可读存储介质,例如易失性存储器和/或非易失性存储器。所述易失性存储器例如可以包括随机存取存储器(RAM)和/或高速缓冲存储器(cache)等。所述非易失性存储器例如可以包括只读存储器(ROM)、硬盘、闪存等。在所述计算机可读存储介质上可以存储一个或多个计算机程序指令,处理器701可以运行所述程序指令,以实现上文所
述的本公开的实施例的视频处理方法以及/或者其他期望的功能。在所述计算机可读存储介质中还可以存储诸如输入信号、信号分量、噪声分量等各种内容。
在一个示例中,电子设备700还可以包括:输入装置703和输出装置704,这些组件通过总线系统和/或其他形式的连接机构(未示出)互连。
此外,该输入装置703还可以包括例如键盘、鼠标等等。
该输出装置704可以向外部输出各种信息,包括确定出的距离信息、方向信息等。该输出装置704可以包括例如显示器、扬声器、打印机、以及通信网络及其所连接的远程输出设备等等。
当然,为了简化,图7中仅示出了该电子设备700中与本公开有关的组件中的一些,省略了诸如总线、输入/输出接口等等的组件。除此之外,根据具体应用情况,电子设备700还可以包括任何其他适当的组件。
除了上述方法和设备以外,本公开的实施例还可以是计算机程序产品,其包括计算机程序指令,所述计算机程序指令在被处理器运行时使得所述处理器执行本公开实施例所提供的视频处理方法。
所述计算机程序产品可以以一种或多种程序设计语言的任意组合来编写用于执行本公开实施例操作的程序代码,所述程序设计语言包括面向对象的程序设计语言,诸如Java、C++等,还包括常规的过程式程序设计语言,诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算设备上执行、部分地在用户设备上执行、作为一个独立的软件包执行、部分在用户计算设备上部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。
此外,本公开的实施例还可以是非瞬态的计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令在被处理器运行时使得所述处理器执行本公开实施例所提供的视频处理方法。
所述计算机可读存储介质可以采用一个或多个可读介质的任意组合。可读介质可以是可读信号介质或者可读存储介质。可读存储介质例如可以包括但不限于电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光
纤、便携式紧凑盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。
本公开实施例还提供了一种计算机程序产品,包括计算机程序/指令,该计算机程序/指令被处理器执行时实现本公开实施例中的视频处理方法。
本公开实施例还提供了一种计算机程序,该计算机程序被处理器执行时实现本公开实施例中的视频处理方法。
需要说明的是,在本文中,诸如“第一”和“第二”等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
以上所述仅是本公开的具体实施方式,使本领域技术人员能够理解或实现本公开。对这些实施例的多种修改对本领域的技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本公开的精神或范围的情况下,在其它实施例中实现。因此,本公开将不会被限制于本文所述的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。
Claims (19)
- 一种视频处理方法,包括:响应于接收到用户针对目标视频发起的运动模糊请求,获取用户设置的运动模糊信息;其中,所述运动模糊信息用于指示模糊处理方式;根据所述运动模糊信息对所述目标视频中的目标帧图像与所述目标帧图像的关联帧图像进行帧间运动估计,得到所述目标帧图像和所述关联帧图像之间的运动趋势;其中,所述目标帧图像为待模糊处理的图像;基于所述关联帧图像和所述运动趋势,对所述目标帧图像进行模糊处理,得到所述目标帧图像对应的模糊帧图像;基于所述模糊帧图像生成所述目标视频对应的运动模糊视频。
- 根据权利要求1所述的方法,其中,所述运动模糊信息包括运动模糊模式,根据所述运动模糊信息对所述目标视频中的目标帧图像与所述目标帧图像的关联帧图像进行帧间运动估计的步骤,包括:根据所述运动模糊模式确定所述目标视频中的待模糊帧图像,并将所述待模糊帧图像作为目标帧图像;根据所述运动模糊模式确定所述目标帧图像在所述目标视频中的关联帧图像;采用预设的光流算法对所述目标帧图像与所述关联帧图像进行帧间运动估计。
- 根据权利要求2所述的方法,其中,根据所述运动模糊模式确定所述目标视频中的待模糊帧图像的步骤,包括:在所述运动模糊模式为双向模式的情况下,将所述目标视频中除首帧图像和末帧图像之外的其它帧图像作为所述目标视频中的待模糊帧图像;在所述运动模糊模式为前导模式的情况下,将所述目标视频中除首帧图像之外的其它帧图像作为所述目标视频中的待模糊帧图像;在所述运动模糊模式为拖影模式的情况下,将所述目标视频中除末帧图像之外的其它帧图像作为所述目标视频中的待模糊帧图像。
- 根据权利要求2所述的方法,其中,根据所述运动模糊模式确定所述目标帧图像在所述目标视频中的关联帧图像的步骤,包括:在所述运动模糊模式为双向模式的情况下,将所述目标帧图像的前一帧图像和后一帧图像作为所述目标帧图像的关联帧图像;在所述运动模糊模式为前导模式的情况下,将所述目标帧图像的前一帧图像作为所述目标帧图像的关联帧图像;在所述运动模糊模式为拖影模式的情况下,将所述目标帧图像的后一帧图像作为所述目标帧图像的关联帧图像。
- 根据权利要求2所述的方法,其中,采用预设的光流算法对所述目标帧图像与所述关联帧图像进行帧间运动估计的步骤,包括:将所述目标帧图像和所述关联帧图像分别执行下采样处理;基于改进后的DIS光流算法对下采样后的所述目标帧图像和下采样后的所述关联帧图像进行帧间运动估计,得到第一运动向量;其中,所述改进后的DIS光流算法所采用的迭代次数小于原有DIS光流算法所采用的迭代次数;对所述第一运动向量执行上采样操作,得到第二运动向量;基于所述第二运动向量得到所述目标帧图像和所述关联帧图像之间的运动向量。
- 根据权利要求5所述的方法,其中,基于所述第二运动向量得到所述目标帧图像和所述关联帧图像之间的运动向量的步骤,包括:对所述第二运动向量进行均值模糊处理,并将均值模糊处理后的所述第二运动向量作为所述目标帧图像和所述关联帧图像之间的运动向量。
- 根据权利要求1所述的方法,其中,所述运动模糊信息包括模糊程度;基于所述关联帧图像和所述运动趋势,对所述目标帧图像进行模糊处理的步骤,包括:基于所述关联帧图像、所述运动趋势和所述模糊程度,对所述目标帧图像进行模糊处理。
- 根据权利要求7所述的方法,其中,所述运动模糊信息还包括形变模糊功能的状态;所述状态包括开启状态或关闭状态;基于所述关联帧图像、所述运动趋势和所述模糊程度,对所述目标帧图像进行模糊处理的步骤,包括:根据所述形变模糊功能的状态,基于所述关联帧图像、所述运动趋势和所述模糊程度,对所述目标帧图像进行模糊处理。
- 根据权利要求8所述的方法,其中,根据所述形变模糊功能的状态,基于所述关联帧图像、所述运动趋势和所述模糊程度,对所述目标帧图像进行模糊处理的步骤,包括:在所述形变模糊功能的状态为开启状态的情况下,判断所述目标帧图像与所述关联帧图像之间的图像内容是否相关;如果所述目标帧图像与所述关联帧图像之间的图像内容相关,则基于所述关联帧图像、所述运动趋势和所述模糊程度,对所述目标帧图像进行模糊处理;如果所述目标帧图像与所述关联帧图像之间的图像内容不相关,则对所述关联帧图像进行形变模糊处理,并基于形变模糊处理后的所述关联帧图像、所述运动趋势和所述模糊程度,对所述目标帧图像进行模糊处理。
- 根据权利要求9所述的方法,其中,判断所述目标帧图像与所述关联帧图像之间的图像内容是否相关的步骤,包括:基于预设的SAD算法获取所述目标帧图像与所述关联帧图像之间的SAD值;根据所述SAD值以及预设阈值判断所述目标帧图像与所述关联帧图像之间的图像内容是否相关。
- 根据权利要求7所述的方法,其中,所述运动趋势以运动向量的形式表征;基于所述关联帧图像、所述运动趋势和所述模糊程度,对所述目标帧图像进行模糊处理,得到所述目标帧图像对应的模糊帧图像的步骤,包括:基于所述模糊程度对所述目标帧图像和所述关联帧图像之间的运动向量进行调整,得到调整后的运动向量;获取所述调整后的运动向量对应的像素点采样次数;根据所述像素点采样次数和所述调整后的运动向量,对所述目标帧图像进行模糊处理,得到所述目标帧图像对应的模糊帧图像。
- 根据权利要求11所述的方法,其中,基于所述模糊程度对所述目标帧图像和所述关联帧图像之间的运动向量进行调整,得到调整后的运动向量的步骤,包括:根据所述模糊程度确定用于调整所述目标帧图像和所述关联帧图像之间的运动向量的比例系数;令所述比例系数与所述目标帧图像和所述关联帧图像之间的运动向量相乘,得到调整后的运动向量。
- 根据权利要求11所述的方法,其中,获取所述调整后的运动向量对应的像素点采样次数的步骤,包括:基于所述调整后的运动向量的长度,获取像素点采样次数;其中,所述长度与所述像素点采样次数为正相关。
- 根据权利要求11所述的方法,其中,根据所述像素点采样次数和所述调整后的运动向量,对所述目标帧图像进行模糊处理,得到所述目标帧图像对应的模糊帧图像的步骤,包括:对于所述目标帧图像上的每个像素点,根据所述像素点采样次数获取该像素点在所述调整后的运动向量上对应的多个像素采样值;将所述目标帧图像上的每个像素点的原始像素值以及每个像素点对应的多个像素采样值进行累加平均处理,得到每个像素点对应的综合像素值;基于每个像素点对应的综合像素值生成所述目标帧图像对应的模糊帧图像。
- 根据权利要求1所述的方法,其中,所述运动模糊信息还包括融合程度;基于所述模糊帧图像生成所述目标视频对应的运动模糊视频的步骤,包括:基于所述融合程度,将所述模糊帧图像与所述关联帧图像进行融合,得到融合帧图像;按照时间顺序将每个所述模糊帧图像对应的融合帧图像进行排列,生成所述目标视频对应的运动模糊视频。
- 一种视频处理装置,包括:参数获取模块,用于响应于接收到用户针对目标视频发起的运动模糊请求,获取用户设置的运动模糊信息;其中,所述运动模糊信息用于指示模糊处理方式;运动估计模块,用于根据所述运动模糊方向对所述目标视频中的目标帧图像与所述目标帧图像的关联帧图像进行帧间运动估计,得到所述目标帧图像和所述关联帧图像之间的运动趋势;其中,所述目标帧图像为待模糊处理的图像;模糊处理模块,用于基于所述关联帧图像和所述运动趋势,对所述目标帧图像进行模糊处理,得到所述目标帧图像对应的模糊帧图像;视频生成模块,用于基于所述模糊帧图像生成所述目标视频对应的运动模糊视频。
- 一种电子设备,所述电子设备包括:处理器;用于存储所述处理器可执行指令的存储器;所述处理器,用于从所述存储器中读取所述可执行指令,并执行所述指令以实现根据上述权利要求1-15中任一所述的视频处理方法。
- 一种非瞬态的计算机可读存储介质,所述存储介质存储有计算机程序,所述计算机程序用于执行根据上述权利要求1-15中任一所述的视频处理方法。
- 一种计算机程序,所述计算机程序被处理器执行时实现根据上述权利要求1-15中任一所述的视频处理方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211475553.3A CN118075546A (zh) | 2022-11-23 | 2022-11-23 | 视频处理方法、装置、设备及介质 |
CN202211475553.3 | 2022-11-23 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2024109875A1 true WO2024109875A1 (zh) | 2024-05-30 |
Family
ID=91097818
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2023/133612 WO2024109875A1 (zh) | 2022-11-23 | 2023-11-23 | 视频处理方法、装置、设备及介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN118075546A (zh) |
WO (1) | WO2024109875A1 (zh) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20210125305A1 (en) * | 2018-04-11 | 2021-04-29 | Nippon Telegraph And Telephone Corporation | Video generation device, video generation method, program, and data structure |
CN113066001A (zh) * | 2021-02-26 | 2021-07-02 | 华为技术有限公司 | 一种图像处理方法及相关设备 |
CN113313788A (zh) * | 2020-02-26 | 2021-08-27 | 北京小米移动软件有限公司 | 图像处理方法和装置、电子设备以及计算机可读存储介质 |
CN114419073A (zh) * | 2022-03-09 | 2022-04-29 | 荣耀终端有限公司 | 一种运动模糊生成方法、装置和终端设备 |
CN114862725A (zh) * | 2022-07-07 | 2022-08-05 | 广州光锥元信息科技有限公司 | 基于光流法实现运动感知模糊特效的方法及装置 |
CN115035150A (zh) * | 2022-06-07 | 2022-09-09 | 中国银行股份有限公司 | 视频数据处理方法及装置 |
-
2022
- 2022-11-23 CN CN202211475553.3A patent/CN118075546A/zh active Pending
-
2023
- 2023-11-23 WO PCT/CN2023/133612 patent/WO2024109875A1/zh unknown
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20210125305A1 (en) * | 2018-04-11 | 2021-04-29 | Nippon Telegraph And Telephone Corporation | Video generation device, video generation method, program, and data structure |
CN113313788A (zh) * | 2020-02-26 | 2021-08-27 | 北京小米移动软件有限公司 | 图像处理方法和装置、电子设备以及计算机可读存储介质 |
CN113066001A (zh) * | 2021-02-26 | 2021-07-02 | 华为技术有限公司 | 一种图像处理方法及相关设备 |
CN114419073A (zh) * | 2022-03-09 | 2022-04-29 | 荣耀终端有限公司 | 一种运动模糊生成方法、装置和终端设备 |
CN115035150A (zh) * | 2022-06-07 | 2022-09-09 | 中国银行股份有限公司 | 视频数据处理方法及装置 |
CN114862725A (zh) * | 2022-07-07 | 2022-08-05 | 广州光锥元信息科技有限公司 | 基于光流法实现运动感知模糊特效的方法及装置 |
Also Published As
Publication number | Publication date |
---|---|
CN118075546A (zh) | 2024-05-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11526970B2 (en) | System and method for video processing with enhanced temporal consistency | |
CN110392282B (zh) | 一种视频插帧的方法、计算机存储介质及服务器 | |
CN105409196A (zh) | 用于视频稳定的自适应路径平滑 | |
US8310582B2 (en) | Digital image processing apparatus and method for displaying a plurality of images | |
WO2017032078A1 (zh) | 一种界面控制方法及移动终端 | |
CN109344062A (zh) | 页面跨域跳转测试的方法及终端设备 | |
WO2022161280A1 (zh) | 视频插帧方法、装置及电子设备 | |
CN112149545A (zh) | 样本生成方法、装置、电子设备及存储介质 | |
WO2022111208A1 (zh) | 一种视频帧频提升方法、装置、设备及介质 | |
CN116301530A (zh) | 虚拟场景处理方法、装置、电子设备及存储介质 | |
US20220006971A1 (en) | Screen recording method and apparatus, and electronic device | |
WO2024109875A1 (zh) | 视频处理方法、装置、设备及介质 | |
WO2024067512A1 (zh) | 视频密集预测方法及其装置 | |
WO2024067461A1 (zh) | 图像处理方法、装置、计算机设备和存储介质 | |
WO2018210113A1 (zh) | 动态信息展示的方法、计算机设备和存储介质 | |
WO2023246844A1 (zh) | 视频处理方法、装置、设备及介质 | |
CN107743270A (zh) | 交互方法及设备 | |
WO2023174137A1 (zh) | 一种图像处理方法、装置、计算机设备以及存储介质 | |
CN107248947A (zh) | 表情处理方法及装置、计算机设备及存储介质 | |
CN114205648B (zh) | 插帧方法及装置 | |
CN107368376B (zh) | 消息发送方法及装置、扩展方法、终端 | |
CN115147281A (zh) | 一种图像参数调整方法、装置、设备及存储介质 | |
CN114816057A (zh) | 体感智能终端交互方法、装置、设备及存储介质 | |
CN111753234B (zh) | 一种数据可视化方法、装置、服务器和介质 | |
CN112381713B (zh) | 图像拼接方法和装置、计算机可读存储介质、电子设备 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 23893964 Country of ref document: EP Kind code of ref document: A1 |