WO2020019164A1 - Video processing method and device, and computer-readable storage medium - Google Patents

Video processing method and device, and computer-readable storage medium Download PDF

Info

Publication number
WO2020019164A1
WO2020019164A1 PCT/CN2018/096847 CN2018096847W WO2020019164A1 WO 2020019164 A1 WO2020019164 A1 WO 2020019164A1 CN 2018096847 W CN2018096847 W CN 2018096847W WO 2020019164 A1 WO2020019164 A1 WO 2020019164A1
Authority
WO
WIPO (PCT)
Prior art keywords
video frame
target video
target
pixel
processing
Prior art date
Application number
PCT/CN2018/096847
Other languages
French (fr)
Chinese (zh)
Inventor
李菊梅
Original Assignee
深圳市大疆创新科技有限公司
大疆互娱科技(北京)有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 深圳市大疆创新科技有限公司, 大疆互娱科技(北京)有限公司 filed Critical 深圳市大疆创新科技有限公司
Priority to CN201880039251.7A priority Critical patent/CN110786002B/en
Priority to PCT/CN2018/096847 priority patent/WO2020019164A1/en
Publication of WO2020019164A1 publication Critical patent/WO2020019164A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/268Signal distribution or switching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/2621Cameras specially adapted for the electronic generation of special effects during image pickup, e.g. digital cameras, camcorders, video cameras having integrated special effects capability

Definitions

  • Video transitions are a type of video processing. Video files usually include multiple videos. These videos usually have different shots or different scenes. If you switch shots or scenes directly, it will appear abrupt, so you need to transition between each other, that is, you need to transition between two videos. .
  • the video is usually modified using a unified transition material, such as shutters, fly-in, checkerboard, dimming, etc.
  • a unified transition material such as shutters, fly-in, checkerboard, dimming, etc.
  • using a unified transition material to complete the transition of the video has the same effect for all video transitions. During the transition process, it cannot be personalized according to the different videos, and the transition effect is poor.
  • the invention provides a video processing method, a device, and a computer-readable storage medium, which can realize a personalized video transition and a better transition effect.
  • a video processing method including:
  • the memory is used to store program code
  • the processor is configured to call the program code, and when the program code is executed, is configured to perform the following operations:
  • a computer-readable storage medium stores computer instructions.
  • the computer instructions When the computer instructions are executed, the video according to the first aspect of the embodiments of the present invention is implemented. Approach.
  • a gradient factor corresponding to the target video frame is first determined, and when the target video frame is processed, the target video frame is processed according to the target video frame.
  • the specified pixel characteristics of the pixels and the corresponding gradient factor are processed, that is, the target video frame is processed according to the personalized information of each target video frame, which can realize a personalized video transition, and the transition effect is better; at the same time,
  • the target video frame is processed by flooding, which can make the bright area produce a halo effect and make the video transition effect better.
  • FIG. 1 is a schematic flowchart of a video processing method according to an embodiment of the present invention.
  • FIG. 2 is a schematic flowchart of a flood processing of a video frame according to an embodiment of the present invention
  • FIG. 3-6 are schematic diagrams of flood effects of a video frame during a transition process according to an embodiment of the present invention.
  • FIG. 7 is a structural block diagram of an electronic device according to an embodiment of the present invention.
  • first, second, third, etc. may be used in the present invention to describe various information, these information should not be limited to these terms. These terms are used to distinguish the same type of information from each other.
  • first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information.
  • word “if” can be interpreted as “at”, or “at ", or "in response to a determination”.
  • An embodiment of the present invention provides a video processing method, which can be applied to an electronic device.
  • the electronic device may be a device having a video processing function, and is not limited in particular.
  • the electronic device may be a computer device or an embedded device.
  • the electronic device may be provided with a display device, or it may not have a display device. , But transfer the video to another device for display after processing.
  • the electronic device may be a mobile phone.
  • the function of performing video editing on a mobile phone is increasingly required by users.
  • the video processing method of the embodiment of the present invention can be applied to a mobile phone and can be widely used by users. Because video processing involves a large amount of data processing, in the case that the mobile phone has such resources as OpenGL (Open Graphics Library) and GPU (Graphic Processing Unit), the mobile phone video editor can use OpenGL and implement the invention on the GPU.
  • the video processing method of the example can use the limited resources of the mobile phone to achieve better processing results while being able to preview the video in real time.
  • the above are only possible application platforms and implementation manners of the video processing method according to the embodiment of the present invention, and are not specifically limited thereto.
  • processing of a video transition is mainly performed.
  • the transition material is used to perform transition processing on the video.
  • the pixel characteristics at a specified area of the video frame during the transition are modified to a uniform color, and a checkerboard is finally displayed in the video frame.
  • the image of the shape disappears in the subsequent frames, completing the transition process. Since the specified area and color are the same for all videos, so for different videos that require a transition, a personalized transition effect cannot be achieved.
  • a gradient factor corresponding to the target video frame is first determined, and when processing the target video frame, according to the specified pixels of the pixels of the target video frame Features and corresponding gradient factors are processed, that is, the target video frame is processed according to the personalized information of each target video frame, which can realize a personalized video transition, and the transition effect is better; at the same time, the target video frame is processed.
  • the processing performed is flood light processing, which can make the bright area produce a halo effect and make the video transition effect better.
  • a video processing method may include the following steps:
  • the execution body of the video processing method may be an electronic device, and further may be a processor of the electronic device, where the processor may be one or more, and the processor may be a general-purpose processor or a special-purpose processor.
  • the first video and the second video may be two sub-video segments in the same video that need to be transitioned; or two different videos, and the two videos may be respectively processed according to the video processing method of the embodiment of the present invention. After processing, stitching is performed, or two videos may be stitched into one video, and then processed according to the video processing method of the embodiment of the present invention.
  • both the first video and the second video have a target video frame of the transition, that is, during the transition, the subsequent frames of the first video and the first frames of the second video need to be processed accordingly.
  • a gradient factor corresponding to each target video frame may be determined, that is, a gradient factor corresponding to each target video frame in the first video, and / or each of the second video may be determined.
  • the gradient factor corresponding to the target video frame may be determined, that is, a gradient factor corresponding to each target video frame in the first video, and / or each of the second video may be determined.
  • the gradient factors corresponding to different target video frames may be the same or different, as long as each target video frame has a corresponding gradient factor.
  • Each gradient factor may be pre-stored in the memory of the electronic device, and then the corresponding gradient factor may be called by the processor during the transition from the first video to the second video; or, each gradient factor may also be transferred from the first video to The process of the second video is determined by calculation by the processor, and is not specifically limited.
  • step S200 for the target video frame that is determined to have a gradation factor, the processor performs flood processing on the target video frame according to the specified pixel characteristics of the pixels of the target video frame and the gradation factor corresponding to the target video frame.
  • the specified pixel characteristics of its pixels and their corresponding gradient factors are personalized information of the target video frame. Therefore, when performing flooding processing on the target video frame, processing is performed according to the specified pixel characteristics of the pixels of the target video frame and the gradient factor corresponding to the target video frame.
  • the flooding effect obtained by different target video frames will be personalized.
  • the transition effects of different videos will be personalized.
  • the transition part of the final video can be presented Dynamically changing flood effect.
  • the gradient factor of each target video frame in the first video gradually decreases from 1, 1-1 / fps and 1-2 / fps to 0, and the The gradient factor of each target video frame is gradually increased from 0, 1 / fps, 2 / fps to 1, and fps is the frame rate.
  • the gradient factor of each target video frame in the first video can be reduced from 1 to 0 and remain unchanged, the gradient factor of the first N target video frames in the second video can be maintained to 0, and the gradient of the remaining target video frames can be maintained.
  • the factor can be gradually increased to 1.
  • N is equal to the number of target video frames whose gradient factor in the first video is a set gradient factor, but it is not a limitation.
  • any one of the R channel feature, G channel feature, and B channel feature of a pixel of the target video frame is greater than the gradient factor, all channel features of the pixel are stretched.
  • the exponential function is used to stretch the specified pixel features of the pixels, and the specified pixel features of all pixels higher than the gradient factor can be stretched while forming a certain brightness difference.
  • the set exponential function is monotonically increasing within the value range of the specified pixel feature. Therefore, the darker object corresponds to a lower target stretch value, and the brighter object corresponds to a higher target stretch value. The brightness difference from bright objects is widened.
  • the exponential function used is not particularly limited, as long as it can achieve brightness stretching and can form a certain brightness difference.
  • the manner of performing the stretch processing on the designated pixel feature of the pixel is not limited to being implemented by an exponential function, and may also be another stretch capable of stretching the designated pixel feature of the pixel that is higher than the gradient factor.
  • step S200 the target video frame is flooded according to the specified pixel characteristics of the pixels of the target video frame and the gradient factor corresponding to the target video frame. include:
  • S203 Perform blur processing on the target video frame after the stretching processing.
  • This step S203 may be performed after step S201.
  • the processor performs blur processing on the entire target video frame, and may blur the entire target video frame to make the transition effect better.
  • the specific blur processing method is not limited, for example, it can be mean blur, Gaussian blur, median blur, binary blur, etc.
  • the blur processing operation it is not limited to one blur processing mode, and it can be combined with several blur processing modes.
  • performing the blur processing on the target video frame after the stretching processing includes: performing Gaussian blur processing on the target video frame after the stretching processing in a horizontal and / or vertical direction.
  • the target video frame is Gaussian blurred in the horizontal and vertical directions, respectively.
  • the target video frame can also be Gaussian-blurred only in the horizontal or vertical direction, which is not limited.
  • the method further includes:
  • the method further includes:
  • S204 Up-sampling the target video frame after the blur processing, so that the target video frame after the upsampling and the target video frame before the downsampling have the same size.
  • the execution order of the processor may be sequentially executed from step S201 to step S204.
  • step S201 after the processor stretches the specified pixel characteristics of the pixel of the target video frame that is higher than the gradient factor, the processor executes step S202.
  • the processor downsamples the target video frame after the stretching process. It is the subsequent Gaussian blurring to reduce the amount of calculation, and the size after specific downsampling is not limited. For example, downsampling is one in every two pixels.
  • the processor After the down-sampling is completed, the processor performs blur processing on the target video frame in step S203. For details, refer to the foregoing content about blur processing, and details are not described herein again.
  • step S204 the processor performs upsampling on the blurred target video frame, so that the target video frame after the upsampling and the target video frame before the downsampling have the same size. For example, when downsampling is sampling one out of every two pixels, each pixel is subjected to interpolation reconstruction to obtain two pixels.
  • OpenGl to achieve up-sampling and down-sampling does not cost much calculation, but it can reduce the calculation of blurring processing, and the process of upsampling can actually further blur the entire target video frame.
  • S205 For a specified pixel feature of each pixel in the target video frame, use the specified pixel feature and a set exponential function to determine a target stretch value of the specified pixel feature, and stretch the specified pixel feature of the pixel to the target. Stretch value to stretch the target video frame as a whole.
  • the set exponential function may be the same as the exponential function in step S201, but may be different. If it is the same, after using the exponential function to perform the stretching process, the maximum value of the specified pixel feature of all pixels in the target video frame is a value close to 1, but not 1. In order to appear a white light effect, further stretching is needed, for example, weighting can be performed to This further stretching is implemented so that the designated pixel feature of at least some pixels in the target video frame is 1.
  • the exponential function in step S205 may be a function obtained by weighting the exponential function in step S201, and the function may be a monotonically increasing function or a piecewise function, which is not limited as long as the overall stretching can be achieved So that the designated pixel feature of at least some pixels in the target video frame is 1.
  • step S201 performing the stretching processing on the specified pixel feature of the pixel of the target video frame includes:
  • the specified pixel characteristics of the pixels of the target video frame are higher than the gradient factor of the target video frame.
  • the specified pixel characteristics of the pixels of the target video frame are set to the maximum value, such as the R channel characteristics , G-channel features and B-channel features are all stretched to 1 so that the target video frame appears completely white.
  • Gradient factor is to set the target video frame of the gradient factor to be the last frame or frames in the first video and / or the previous frame or frames in the second video during the transition from the first video to the second video. Frames, rendering such target video frames as completely white pictures can make the second video appear again after the first video completely disappears, and the connection is more natural.
  • the method further includes the following steps:
  • the specified pixel characteristics of the pixels of the target video frame are lower than the corresponding gradient factor of the target video frame, it means that these pixels correspond to dark objects and do not need to be flooded. Then, modify the specified pixel characteristics of the pixels of the target video frame. To set the minimum value, for example, the R channel feature, G channel feature, and B channel feature are all lowered to 0, which can be further darkened.
  • the un-flooded target video frame may be the original target video frame without any processing.
  • This step S400 may be performed after the execution of step S200 is completed, or after the execution of steps S300 and S200 is completed, the processor fuses the target video frame that is not flooded and the video frame obtained after the target video frame is flooded, The fused video frame is used as a video frame that is finally presented during the transition, and can be displayed on the display device in real time after the fusion.
  • the fusing the target video frame that is not flooded with the video frame obtained after the target video frame is flooded includes:
  • the pixel at the same position in the video frame obtained by flooding the target video frame and the video frame obtained by flooding the target video frame is superimposed, and the designated pixel characteristic of each pixel during the superimposition is the greater of the two.
  • the specified pixel characteristics of the pixels at corresponding positions in the target video frame without flooding and the target video frame that has been flooded are compared, and the superposition is performed on the target video frame without flooding as an example.
  • the specified pixel characteristics of the pixels of the target video frame that are not flooded are large, the specified pixel characteristics of the pixels of the target video frame that are not flooded are not modified. If the pixels of the target video frame that have been flooded are not If the specified pixel feature of the target is larger, the specified pixel feature of the pixel of the target video frame that has not been flooded is modified to the specified pixel feature of the pixel of the target video frame that has been flooded. Finally, these larger specified pixel features are fused on a video frame.
  • Figure 3-6 shows only four video frames (arranged in chronological order) processed by the video processing method of the embodiment of the present invention during the transition from the first video to the second video, two of the first video
  • the video frame ( Figure 3 and Figure 4) flood area is increased frame by frame, but important objects (people, etc.) are finally disappeared.
  • the two video frames in the second video ( Figure 5 and Figure 6) flood area It is reduced on a frame-by-frame basis, and important objects (people, etc.) appear last, so that the objects that are most interesting to the user can be retained for the longest time.
  • an embodiment of the present invention further provides an electronic device 100 including: a memory 101 and a processor 102 (such as one or more processors);
  • the memory is used to store program code;
  • the processor is used to call the program code, and when the program code is executed, is used to perform the following operations:
  • the gradient factor of each target video frame in the first video decreases; the gradient factor of each target video frame in the second video increases; or,
  • the gradient factor of each target video frame in the first video decreases to a set gradient factor and remains unchanged; the gradient factor of the first N target video frames in the second video maintains the set gradient factor, and the remaining target videos The frame's gradient factor is incremented.
  • the specified pixel feature of the pixel of the target video frame is higher than the gradient factor corresponding to the target video frame, the specified pixel feature of the pixel of the target video frame is stretched.
  • the processing is specifically used when performing flood processing on the target video frame according to the specified pixel characteristics of the pixels of the target video frame and the gradient factor corresponding to the target video frame:
  • the processor when the processor performs blur processing on the target video frame after stretching processing, the processor is specifically configured to:
  • Gaussian blur processing is performed on the target video frame after stretching in the horizontal and / or vertical direction.
  • the processor After the processor performs blur processing on the stretched target video frame, the processor is further configured to:
  • the processor is further configured to:
  • the pixel at the same position in the video frame obtained by flooding the target video frame and the video frame obtained by flooding the target video frame is superimposed, and the designated pixel characteristic of each pixel during the superimposition is the greater of the two.
  • the embodiments of the present invention may be provided as a method, a system, or a computer program product. Therefore, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • these computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured article including the instruction device,
  • the instruction device implements the functions specified in a flowchart or a plurality of processes and / or a block or a block of the block diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)

Abstract

Embodiments of the present invention provide a video processing method and device, and a computer-readable storage medium. The video processing method comprises: in the process of transferring from a first video to a second video, determining a fading factor corresponding to each target video frame in the first video, and/or the fading factor corresponding to each target video frame in the second video; and performing floodlight processing on the target video frame according to the designated pixel feature of the pixel of the target video frame and the fading factor corresponding to the target video frame.

Description

视频处理方法、设备、计算机可读存储介质Video processing method, device, and computer-readable storage medium 技术领域Technical field
本发明涉及视频处理技术领域,尤其是涉及一种视频处理方法、设备、计算机可读存储介质。The present invention relates to the technical field of video processing, and in particular, to a video processing method, device, and computer-readable storage medium.
背景技术Background technique
视频转场是视频处理的一种。视频文件通常会包括多个视频,这些视频通常是镜头不同或场景不同,如果直接切换镜头或场景,会显得突兀,所以相互之间需要进行过渡,也即需要在两个视频之间进行转场。Video transitions are a type of video processing. Video files usually include multiple videos. These videos usually have different shots or different scenes. If you switch shots or scenes directly, it will appear abrupt, so you need to transition between each other, that is, you need to transition between two videos. .
相关的视频转场方式中,通常都是利用统一的转场素材修改视频,转场素材例如是百叶窗、飞入、棋盘格、渐暗等。然而,利用统一的转场素材来完成视频的转场,对于所有视频转场来说效果都是一样的,转场过程中,无法根据视频的不同而个性化呈现,转场效果较差。In related video transition methods, the video is usually modified using a unified transition material, such as shutters, fly-in, checkerboard, dimming, etc. However, using a unified transition material to complete the transition of the video has the same effect for all video transitions. During the transition process, it cannot be personalized according to the different videos, and the transition effect is poor.
发明内容Summary of the Invention
本发明提供一种视频处理方法、设备、计算机可读存储介质,可实现视频个性化转场,转场效果更好。The invention provides a video processing method, a device, and a computer-readable storage medium, which can realize a personalized video transition and a better transition effect.
本发明实施例第一方面,提供一种视频处理方法,包括:According to a first aspect of the embodiments of the present invention, a video processing method is provided, including:
在从第一视频转至第二视频的过程中,确定第一视频中的各目标视频帧对应的渐变因子、和/或第二视频中的各目标视频帧对应的渐变因子;In the process of transferring from the first video to the second video, determining a gradient factor corresponding to each target video frame in the first video, and / or a gradient factor corresponding to each target video frame in the second video;
依据目标视频帧的像素的指定像素特征及所述目标视频帧对应的渐变因子,对所述目标视频帧进行泛光处理。Performing flood processing on the target video frame according to the specified pixel characteristics of the pixels of the target video frame and the gradient factor corresponding to the target video frame.
本发明实施例第二方面,提供一种电子设备,包括:存储器和处理器;According to a second aspect of the embodiments of the present invention, an electronic device is provided, including: a memory and a processor;
所述存储器,用于存储程序代码;The memory is used to store program code;
所述处理器,用于调用所述程序代码,当所述程序代码被执行时,用于 执行以下操作:The processor is configured to call the program code, and when the program code is executed, is configured to perform the following operations:
在从第一视频转至第二视频的过程中,确定第一视频中的各目标视频帧对应的渐变因子、和/或第二视频中的各目标视频帧对应的渐变因子;In the process of transferring from the first video to the second video, determining a gradient factor corresponding to each target video frame in the first video, and / or a gradient factor corresponding to each target video frame in the second video;
依据目标视频帧的像素的指定像素特征及所述目标视频帧对应的渐变因子,对所述目标视频帧进行泛光处理。Performing flood processing on the target video frame according to the specified pixel characteristics of the pixels of the target video frame and the gradient factor corresponding to the target video frame.
本发明实施例第三方面,提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机指令,所述计算机指令被执行时,实现本发明实施例第一方面所述的视频处理方法。According to a third aspect of the embodiments of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium stores computer instructions. When the computer instructions are executed, the video according to the first aspect of the embodiments of the present invention is implemented. Approach.
基于上述技术方案,本发明实施例中,在从第一视频转至第二视频的过程中,先确定目标视频帧对应的渐变因子,针对该目标视频帧进行处理时,依据该目标视频帧的像素的指定像素特征及对应的渐变因子进行处理,即是依据每个目标视频帧的个性化信息对该目标视频帧进行处理的,可实现视频个性化转场,转场效果更好;同时,对目标视频帧所进行的处理为泛光处理,可使得明亮区域产生光晕效果,使得视频转场效果更好。Based on the above technical solution, in the embodiment of the present invention, in the process of transferring from the first video to the second video, a gradient factor corresponding to the target video frame is first determined, and when the target video frame is processed, the target video frame is processed according to the target video frame. The specified pixel characteristics of the pixels and the corresponding gradient factor are processed, that is, the target video frame is processed according to the personalized information of each target video frame, which can realize a personalized video transition, and the transition effect is better; at the same time, The target video frame is processed by flooding, which can make the bright area produce a halo effect and make the video transition effect better.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更加清楚地说明本发明实施例中的技术方案,下面将对本发明实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明中记载的一些实施例,对于本领域普通技术人员来讲,还可以根据本发明实施例的这些附图获得其它的附图。In order to explain the technical solutions in the embodiments of the present invention more clearly, the drawings used in the embodiments of the present invention will be briefly introduced below. Obviously, the drawings in the following description are just some implementations described in the present invention. For a person of ordinary skill in the art, other drawings may be obtained based on the drawings of the embodiments of the present invention.
图1是本发明一实施例的视频处理方法的流程示意图;1 is a schematic flowchart of a video processing method according to an embodiment of the present invention;
图2是本发明一实施例的对视频帧泛光处理的流程示意图;FIG. 2 is a schematic flowchart of a flood processing of a video frame according to an embodiment of the present invention; FIG.
图3-6是本发明一实施例的转场过程中视频帧的泛光效果示意图;3-6 are schematic diagrams of flood effects of a video frame during a transition process according to an embodiment of the present invention;
图7是本发明一实施例的电子设备的结构框图。FIG. 7 is a structural block diagram of an electronic device according to an embodiment of the present invention.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。另外,在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。In the following, the technical solutions in the embodiments of the present invention will be clearly and completely described with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention. In addition, in the case of no conflict, the following embodiments and features in the embodiments can be combined with each other.
本发明使用的术语仅仅是出于描述特定实施例的目的,而非限制本发明。本发明和权利要求书所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其它含义。应当理解的是,本文中使用的术语“和/或”是指包含一个或多个相关联的列出项目的任何或所有可能组合。The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the invention. The singular forms "a," "the," and "the" as used in this invention and in the claims are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should be understood that the term "and / or" as used herein means any or all possible combinations containing one or more of the associated listed items.
尽管在本发明可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语用来将同一类型的信息彼此区分开。例如,在不脱离本发明范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,此外,所使用的词语“如果”可以被解释成为“在……时”,或者,“当……时”,或者,“响应于确定”。Although the terms first, second, third, etc. may be used in the present invention to describe various information, these information should not be limited to these terms. These terms are used to distinguish the same type of information from each other. For example, without departing from the scope of the present invention, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, in addition, the word "if" can be interpreted as "at", or "at ...", or "in response to a determination".
本发明实施例中提出一种视频处理方法,可以应用在电子设备上。电子设备可以是具有视频处理功能的设备,具体不限,例如可以是计算机设备、或嵌入式设备等不限,为了显示视频处理效果,电子设备可设有显示装置,当然也可以不具有显示装置,而是将视频处理之后传输至其他设备进行显示。An embodiment of the present invention provides a video processing method, which can be applied to an electronic device. The electronic device may be a device having a video processing function, and is not limited in particular. For example, the electronic device may be a computer device or an embedded device. In order to display the video processing effect, the electronic device may be provided with a display device, or it may not have a display device. , But transfer the video to another device for display after processing.
例如,电子设备可以为手机。在手机上进行视频编辑的功能越来越被用户所需要,本发明实施例的视频处理方法可以应用在手机上,可被用户广泛使用。由于视频处理涉及大量的数据处理,在手机具有OpenGL(开放图形库)及GPU(Graphic Processing Unit,图形处理器)这些资源的情况下,手机视频编辑器可使用OpenGL并在GPU上实现本发明实施例的视频处理方法,可利用手机有限的资源,在能够实视频实时性预览的同时,可达到更好的处理 效果。当然,上述仅是本发明实施例的视频处理方法所可能的应用平台及实现方式,具体并不限于此。For example, the electronic device may be a mobile phone. The function of performing video editing on a mobile phone is increasingly required by users. The video processing method of the embodiment of the present invention can be applied to a mobile phone and can be widely used by users. Because video processing involves a large amount of data processing, in the case that the mobile phone has such resources as OpenGL (Open Graphics Library) and GPU (Graphic Processing Unit), the mobile phone video editor can use OpenGL and implement the invention on the GPU. The video processing method of the example can use the limited resources of the mobile phone to achieve better processing results while being able to preview the video in real time. Of course, the above are only possible application platforms and implementation manners of the video processing method according to the embodiment of the present invention, and are not specifically limited thereto.
本发明实施例的视频处理方法中,主要是视频转场的处理。相关的视频转场处理方式中,利用转场素材对视频进行转场处理,例如将转场过程中的视频帧的指定区域处的像素特征修改为统一的颜色,最终该视频帧中呈现棋盘格形状的图像,在后续帧中该棋盘格形状的图像消失,完成转场过程。由于该指定区域及颜色对所有视频而言都是相同的,如此,对于需要转场的不同视频而言,不能实现个性化的转场效果。In the video processing method according to the embodiment of the present invention, processing of a video transition is mainly performed. In the related video transition processing method, the transition material is used to perform transition processing on the video. For example, the pixel characteristics at a specified area of the video frame during the transition are modified to a uniform color, and a checkerboard is finally displayed in the video frame. The image of the shape disappears in the subsequent frames, completing the transition process. Since the specified area and color are the same for all videos, so for different videos that require a transition, a personalized transition effect cannot be achieved.
而本发明实施例中,在从第一视频转至第二视频的过程中,先确定目标视频帧对应的渐变因子,针对该目标视频帧进行处理时,依据该目标视频帧的像素的指定像素特征及对应的渐变因子进行处理,即是依据每个目标视频帧的个性化信息对该目标视频帧进行处理的,可实现视频个性化转场,转场效果更好;同时,对目标视频帧所进行的处理为泛光处理,可使得明亮区域产生光晕效果,使得视频转场效果更好。In the embodiment of the present invention, in the process of transferring from the first video to the second video, a gradient factor corresponding to the target video frame is first determined, and when processing the target video frame, according to the specified pixels of the pixels of the target video frame Features and corresponding gradient factors are processed, that is, the target video frame is processed according to the personalized information of each target video frame, which can realize a personalized video transition, and the transition effect is better; at the same time, the target video frame is processed. The processing performed is flood light processing, which can make the bright area produce a halo effect and make the video transition effect better.
下面对本发明实施例的视频处理方法进行更具体的描述,但不应作为限制。The video processing method of the embodiment of the present invention is described in more detail below, but it should not be taken as a limitation.
参看图1,在一个实施例中,一种视频处理方法,可以包括以下步骤:Referring to FIG. 1, in an embodiment, a video processing method may include the following steps:
S100:在从第一视频转至第二视频的过程中,确定第一视频中的各目标视频帧对应的渐变因子、和/或第二视频中的各目标视频帧对应的渐变因子;S100: during the transition from the first video to the second video, determining a gradient factor corresponding to each target video frame in the first video, and / or a gradient factor corresponding to each target video frame in the second video;
S200:依据目标视频帧的像素的指定像素特征及所述目标视频帧对应的渐变因子,对所述目标视频帧进行泛光处理。S200: Perform flood light processing on the target video frame according to the specified pixel characteristics of the pixels of the target video frame and the gradient factor corresponding to the target video frame.
具体地,视频处理方法的执行主体可以为电子设备,进一步地可以为电子设备的处理器,其中,处理器可以为一个或多个,处理器可以为通用处理器或者专用处理器。Specifically, the execution body of the video processing method may be an electronic device, and further may be a processor of the electronic device, where the processor may be one or more, and the processor may be a general-purpose processor or a special-purpose processor.
在步骤S100中,从第一视频转至第二视频的过程即为第一视频至第二视频的转场过程,此过程中,所确定的目标视频帧即为转场过程中的视频帧。In step S100, the process from the first video to the second video is the transition process from the first video to the second video. In this process, the determined target video frame is the video frame in the transition process.
第一视频中的各目标视频帧可以是第一视频的后几个视频帧,例如后15 帧,当然,在仅使用第一视频中的目标视频帧实现转场时,第二视频中可以没有目标视频帧。相应的,第二视频中的各目标视频帧可以是第二视频的前几个视频帧,例如前15帧,当然,在仅使用第二视频中的目标视频帧实现转场时,第一视频中可以没有目标视频帧。Each target video frame in the first video may be the last few video frames of the first video, for example, the last 15 frames. Of course, when the transition is performed using only the target video frames in the first video, there may be no The target video frame. Correspondingly, each target video frame in the second video may be the first several video frames of the second video, for example, the first 15 frames. Of course, when the transition is performed using only the target video frames in the second video, the first video There can be no target video frames in.
第一视频和第二视频可以是同一段视频中的两个需要进行转场的子视频段;也可以是两段不同的视频,可以将该两段视频分别按照本发明实施例的视频处理方法进行处理而后进行拼接,或者也可以将两段视频拼接成一段视频再按照本发明实施例的视频处理方法进行处理。The first video and the second video may be two sub-video segments in the same video that need to be transitioned; or two different videos, and the two videos may be respectively processed according to the video processing method of the embodiment of the present invention. After processing, stitching is performed, or two videos may be stitched into one video, and then processed according to the video processing method of the embodiment of the present invention.
优选的,第一视频和第二视频中都有转场的目标视频帧,即转场过程中,对第一视频的后几帧和第二视频的前几帧都需进行相应的处理。Preferably, both the first video and the second video have a target video frame of the transition, that is, during the transition, the subsequent frames of the first video and the first frames of the second video need to be processed accordingly.
在从第一视频转至第二视频的过程中,可以确定各个目标视频帧对应的渐变因子,即确定第一视频中的各目标视频帧对应的渐变因子、和/或第二视频中的各目标视频帧对应的渐变因子。During the transition from the first video to the second video, a gradient factor corresponding to each target video frame may be determined, that is, a gradient factor corresponding to each target video frame in the first video, and / or each of the second video may be determined. The gradient factor corresponding to the target video frame.
不同目标视频帧对应的渐变因子可以是相同的,也可以是不同的,只要每个目标视频帧都有对应的渐变因子即可。各个渐变因子可以是预存在电子设备的存储器中,而后在从第一视频转至第二视频的过程中可由处理器调用相应的渐变因子;或者,各个渐变因子也可以在从第一视频转至第二视频的过程中由处理器计算确定,具体不限。The gradient factors corresponding to different target video frames may be the same or different, as long as each target video frame has a corresponding gradient factor. Each gradient factor may be pre-stored in the memory of the electronic device, and then the corresponding gradient factor may be called by the processor during the transition from the first video to the second video; or, each gradient factor may also be transferred from the first video to The process of the second video is determined by calculation by the processor, and is not specifically limited.
在步骤S200中,针对上述确定有渐变因子的目标视频帧,处理器依据目标视频帧的像素的指定像素特征及目标视频帧对应的渐变因子,对目标视频帧进行泛光处理。In step S200, for the target video frame that is determined to have a gradation factor, the processor performs flood processing on the target video frame according to the specified pixel characteristics of the pixels of the target video frame and the gradation factor corresponding to the target video frame.
对于每个目标视频帧而言,其像素的指定像素特征及其对应的渐变因子,都是该目标视频帧的个性化信息。因而,在对目标视频帧进行泛光处理时,依据目标视频帧的像素的指定像素特征及目标视频帧对应的渐变因子进行处理,不同目标视频帧得到的泛光效果会有个性化差异。相应的,从整体来说,不同视频的转场效果都会有个性化差异。For each target video frame, the specified pixel characteristics of its pixels and their corresponding gradient factors are personalized information of the target video frame. Therefore, when performing flooding processing on the target video frame, processing is performed according to the specified pixel characteristics of the pixels of the target video frame and the gradient factor corresponding to the target video frame. The flooding effect obtained by different target video frames will be personalized. Correspondingly, as a whole, the transition effects of different videos will be personalized.
在从第一视频转至第二视频的过程中,由于每个目标视频帧的泛光效果 会有所差异,相比于对单幅图像进行泛光来说,最终视频的转场部分可以呈现动态变化的泛光效果。During the transition from the first video to the second video, because the flooding effect of each target video frame will be different, compared to flooding a single image, the transition part of the final video can be presented Dynamically changing flood effect.
渐变因子用于确定目标视频帧中需要进行泛光处理的程度,因而在渐变因子渐变时,目标视频帧之间的泛光处理的程度也是渐变的,可呈现出逐渐过渡的效果。The gradation factor is used to determine the degree of flooding required in the target video frame. Therefore, when the gradation factor is gradual, the degree of flooding processing between the target video frames is also gradual, which can present a gradual transition effect.
在一个实施例中,第一视频中的各目标视频帧的渐变因子递减;第二视频中的各目标视频帧的渐变因子递增。可以理解,渐变因子是一个数值,取值范围依据与其进行比较的指定像素特征的取值范围而定。In one embodiment, the gradient factor of each target video frame in the first video decreases; the gradient factor of each target video frame in the second video increases. It can be understood that the gradient factor is a numerical value, and the value range depends on the value range of the specified pixel feature to be compared with.
例如,第一视频中的各目标视频帧的渐变因子可以从1递减至0,第二视频中的各目标视频帧的渐变因子可以从0递增至1。For example, the gradient factor of each target video frame in the first video may decrease from 1 to 0, and the gradient factor of each target video frame in the second video may increase from 0 to 1.
具体的,如在2秒的视频转场过程中,第一视频中的各目标视频帧的渐变因子从1、1-1/fps、1-2/fps逐渐递减到0,第二视频中的各目标视频帧的渐变因子再从0、1/fps、2/fps逐渐递增到1,fps为帧率。Specifically, for example, during a 2-second video transition process, the gradient factor of each target video frame in the first video gradually decreases from 1, 1-1 / fps and 1-2 / fps to 0, and the The gradient factor of each target video frame is gradually increased from 0, 1 / fps, 2 / fps to 1, and fps is the frame rate.
或者,第一视频中的各目标视频帧的渐变因子递减至设定渐变因子后保持不变;第二视频中的前N个目标视频帧的渐变因子维持设定渐变因子,剩余目标视频帧的渐变因子递增。设定渐变因子例如可以取值为0,具体不限。N的取值可以是不小于0的整数,当然小于第二视频的所有目标视频帧的数量。Alternatively, the gradient factor of each target video frame in the first video is gradually reduced to a set gradient factor and remains unchanged; the gradient factor of the first N target video frames in the second video maintains the set gradient factor, and the remaining target video frames are The gradient factor is incremented. The set gradient factor can be set to 0, for example, and is not limited. The value of N may be an integer not less than 0, and certainly less than the number of all target video frames of the second video.
例如,第一视频中的各目标视频帧的渐变因子可以从1递减至0后保持不变,第二视频中的前N个目标视频帧的渐变因子可以维持0,剩余的目标视频帧的渐变因子可以逐渐递增至1。For example, the gradient factor of each target video frame in the first video can be reduced from 1 to 0 and remain unchanged, the gradient factor of the first N target video frames in the second video can be maintained to 0, and the gradient of the remaining target video frames can be maintained. The factor can be gradually increased to 1.
优选的,N与第一视频中的渐变因子为设定渐变因子的目标视频帧的数量相等,但并不作为限制。Preferably, N is equal to the number of target video frames whose gradient factor in the first video is a set gradient factor, but it is not a limitation.
可以理解,各目标视频帧的渐变因子的变化趋势,可以是对称或不对称的。而且,渐变因子作为参数,用于与对应目标视频帧中的像素的指定像素特征比较,取值可视指定像素特征的取值范围而定,并非限于0~1之间。It can be understood that the change trend of the gradient factor of each target video frame can be symmetrical or asymmetric. Moreover, the gradient factor is used as a parameter for comparison with a specified pixel feature of a pixel in a corresponding target video frame, and the value can be determined according to the value range of the specified pixel feature, and is not limited to between 0 and 1.
优选的,第一视频中的各目标视频帧的渐变因子递减时是按照线性递减 的方式递减,即每次的减值相同。第二视频中的各目标视频帧的渐变因子递增时是按照线性递增的方式递增,即每次的增值相同。当然,线性递减、线性递增并非作为限制,也可以是非线性递减、非线性递增。Preferably, when the gradation factor of each target video frame in the first video is decreasing, it is decreasing in a linearly decreasing manner, that is, the decrease value is the same each time. The gradient factor of each target video frame in the second video is increased in a linearly increasing manner, that is, the increment value is the same each time. Of course, linear decrement and linear increase are not used as restrictions, but can also be non-linear decrement or non-linear increment.
对于像素值为色彩值的目标视频帧来说,指定像素特征可以包括以下至少一种:R通道特征、G通道特征和B通道特征。而若像素值为其他属性值,则指定像素特征也可相应调整,例如,对于像素值为灰度值的目标视频帧来说,指定像素特征则可以是灰度特征。For a target video frame whose pixel value is a color value, the specified pixel feature may include at least one of the following: an R channel feature, a G channel feature, and a B channel feature. If the pixel value is another attribute value, the designated pixel feature may be adjusted accordingly. For example, for a target video frame with a pixel value of a gray value, the designated pixel feature may be a gray feature.
因而,指定像素特征具体不限。在下面的实施例中,以指定像素特征包括R通道特征、G通道特征和B通道特征为例展开说明,但并不作为限制。Therefore, specific pixel characteristics are not limited. In the following embodiments, the specified pixel features include R-channel features, G-channel features, and B-channel features as examples, but are not limited.
R通道特征、G通道特征和B通道特征可以直接是像素的RGB值(R通道值、G通道值、B通道值),这样相应的渐变因子的取值范围便是0~255之间;或者,R通道特征、G通道特征和B通道特征可以是RGB值的归一化值,这样相应的渐变因子的取值范围便是0~1。下面的实施例中,以R通道特征、G通道特征和B通道特征是RGB值的归一化值,渐变因子的取值范围是0~1为例。The R-channel feature, G-channel feature, and B-channel feature can be directly the RGB values of the pixel (R-channel value, G-channel value, B-channel value), so that the corresponding gradient factor ranges from 0 to 255; or The R-channel feature, G-channel feature, and B-channel feature can be normalized values of RGB values, so the corresponding gradient factor ranges from 0 to 1. In the following embodiments, the R channel feature, G channel feature, and B channel feature are normalized values of RGB values, and the range of the gradient factor is 0 to 1 as an example.
在一个实施例中,步骤S200中,所述依据目标视频帧的像素的指定像素特征及目标视频帧对应的渐变因子,对所述目标视频帧进行泛光处理,包括以下步骤:In one embodiment, in step S200, performing flood processing on the target video frame according to the specified pixel characteristics of the pixels of the target video frame and the gradient factor corresponding to the target video frame includes the following steps:
S201:针对每一目标视频帧,若目标视频帧的像素的指定像素特征高于所述目标视频帧对应的渐变因子,则对目标视频帧的所述像素的指定像素特征进行拉伸处理,如图2。S201: For each target video frame, if the specified pixel feature of the pixel of the target video frame is higher than the gradient factor corresponding to the target video frame, stretch the specified pixel feature of the pixel of the target video frame, such as figure 2.
在步骤S201中,针对每一目标视频帧,处理器对目标视频帧中高出渐变因子的像素的指定像素特征进行拉伸处理,这样可以使得目标视频帧中亮的部分更亮,实现该视频帧的泛光。In step S201, for each target video frame, the processor performs stretching processing on the specified pixel feature of the pixel in the target video frame that is higher than the gradient factor, so that the bright part of the target video frame is brighter, and the video frame is realized. Flood light.
当然,处理器会先判断目标视频帧中像素的指定像素特征是否高于目标视频帧对应的渐变因子,可以通过遍历目标视频帧中的像素来实现,每遍历到高出渐变因子的像素的指定像素特征,便对该指定像素特征进行拉伸处理, 完成后,继续遍历下一个,直至该目标视频帧中的像素遍历完。Of course, the processor will first determine whether the specified pixel characteristics of the pixels in the target video frame are higher than the corresponding gradient factor of the target video frame. This can be achieved by traversing the pixels in the target video frame. For the pixel feature, the specified pixel feature is stretched. After completion, it continues to traverse the next until the pixels in the target video frame are traversed.
具体的,目标视频帧中各个像素的R通道特征、G通道特征和B通道特征都与目标视频帧的渐变因子比较,确定是否需要进行拉伸处理。像素的R通道特征与渐变因子比较,若像素的R通道特征大于渐变因子,则将该像素的R通道特征进行拉伸处理;像素的G通道特征与渐变因子比较,若像素的G通道特征大于渐变因子,则将该像素的G通道特征进行拉伸处理;像素的B通道特征与渐变因子比较,若像素的B通道特征大于渐变因子,则将该像素的B通道特征进行拉伸处理。Specifically, the R-channel characteristics, G-channel characteristics, and B-channel characteristics of each pixel in the target video frame are compared with the gradient factor of the target video frame to determine whether stretching processing is required. The pixel's R-channel characteristics are compared with the gradient factor. If the pixel's R-channel characteristics are greater than the gradient factor, the pixel's R-channel characteristics are stretched; if the pixel's G-channel characteristics are compared with the gradient factor, if the pixel's G-channel characteristics are greater than Gradient factor, stretch the G-channel feature of the pixel; compare the B-channel feature of the pixel with the gradient factor. If the B-channel feature of the pixel is greater than the gradient factor, stretch the B-channel feature of the pixel.
在一个实施例中,若目标视频帧的像素的R通道特征、G通道特征和B通道特征中的任意一个大于渐变因子,则将像素的所有通道特征进行拉伸处理。In one embodiment, if any one of the R channel feature, G channel feature, and B channel feature of a pixel of the target video frame is greater than the gradient factor, all channel features of the pixel are stretched.
如前所述的,各目标视频帧的渐变因子可以是:第一视频中的各目标视频帧的渐变因子递减;第二视频中的各目标视频帧的渐变因子递增。当然中间也可有几帧渐变因子维持为设定渐变因子的目标视频帧。As mentioned before, the gradient factor of each target video frame may be: the gradient factor of each target video frame in the first video decreases; the gradient factor of each target video frame in the second video increases. Of course, there may also be several frames in the middle of which the gradient factor is maintained as the target video frame for which the gradient factor is set.
在转场过程中,对于渐变因子递减的目标视频帧来说,高出渐变因子的指定像素特征的像素会逐帧变多,因而泛光区域逐帧变大,在此渐变因子递减的目标视频帧中,越亮的物体会先被泛光,越暗的物体越是后被泛光;对于渐变因子递增的目标视频帧来说,高出渐变因子的指定像素特征的像素会逐帧变少,因而泛光区域逐帧变小,在此渐变因子递增的目标视频帧中,越暗的物体越是先从泛光区域中显现,越亮的物体越是后显现。During the transition process, for the target video frame with decreasing gradient factor, the number of pixels higher than the specified pixel feature of the gradient factor will increase from frame to frame, so the flood area will increase from frame to frame. Here, the target video with decreasing gradient factor In frames, the brighter objects will be flooded first, and the darker objects will be flooded later. For the target video frame with increasing gradient factor, the number of pixels higher than the specified pixel characteristics of the gradient factor will decrease from frame to frame. Therefore, the flooding area becomes smaller frame by frame. In the target video frame with the increasing gradient factor, the darker the object appears first from the flooding area, and the brighter object appears later.
通常在视频中,越暗的物体是越重要的对象,例如人、树、房屋等等实体对象,而越亮的物体通常较为不重要,例如天空、太阳等,因而转场的视频中,第一视频中越重要的对象越是后消失,第二视频中越重要的对象越是先出现。对于不同的视频来说,更重要的物体在每个视频中甚至每帧目标视频帧中都是不同的,但都可以将更重要的物体在转场过程中保持最久。依据目标视频帧的像素的指定像素特征和渐变因子进行拉伸处理,实现了视频转场中的渐变泛光,也在渐变泛光的过程中,突显了更重要的物体。Generally, in video, the darker objects are the more important objects, such as people, trees, houses, and other solid objects, while the brighter objects are usually less important, such as the sky and the sun. Therefore, in the transition video, the first The more important objects in one video disappear later, and the more important objects in the second video appear first. For different videos, the more important objects are different in each video and even each target video frame, but they can keep the more important objects for the longest time during the transition. Stretch processing is performed according to the specified pixel characteristics and gradation factors of the pixels of the target video frame to realize gradual flooding in the video transition. In the process of gradual flooding, more important objects are highlighted.
优选的,步骤S201中,所述对目标视频帧的所述像素的指定像素特征进行拉伸处理包括以下步骤:Preferably, in step S201, the performing stretching processing on the specified pixel feature of the pixel of the target video frame includes the following steps:
S2011:利用设定的指数函数以及所述像素的指定像素特征确定目标拉伸值;S2011: determine a target stretch value by using a set exponential function and a specified pixel characteristic of the pixel;
S2012:将所述像素的指定像素特征拉伸至所述目标拉伸值。S2012: Stretch the specified pixel feature of the pixel to the target stretch value.
步骤S2011中,处理器可以将像素的指定像素特征代入到设定的指数函数中,计算得到该像素的指定像素特征的目标拉伸值。In step S2011, the processor may substitute a specified pixel feature of a pixel into a set exponential function, and calculate a target stretch value of the specified pixel feature of the pixel.
在步骤S2012中,处理器将像素的指定像素特征拉伸至计算得到的目标拉伸值,即将该像素的指定像素特征修改为该目标拉伸值。In step S2012, the processor stretches the specified pixel feature of the pixel to the calculated target stretch value, that is, modifies the specified pixel feature of the pixel to the target stretch value.
由于得到的因变量是对自变量拉伸的值,因而该设定的指数函数的底数大于0,像素的指定像素特征可以作为自变量代入指数函数。当然,由于R通道特征、G通道特征和B通道特征是RGB值的归一化值,因而,利用指数函数计算得到的目标拉伸值的最大值不能超过1,这样的指数函数有很多,在此不再赘述。Since the obtained dependent variable is a value stretched on the independent variable, the base of the set exponential function is greater than 0, and the specified pixel characteristics of the pixel can be substituted into the exponential function as the independent variable. Of course, because the R channel characteristics, G channel characteristics, and B channel characteristics are normalized values of RGB values, the maximum value of the target stretch value calculated by the exponential function cannot exceed 1, and there are many such exponential functions. This will not be repeated here.
采用指数函数来对像素的指定像素特征进行拉伸处理,可以将高于渐变因子的所有像素的指定像素特征拉伸的同时,形成一定的亮度差。该设定的指数函数在指定像素特征的取值范围内是单调递增的,因而,越暗的物体对应的目标拉伸值越低,越亮的物体对应的目标拉伸值越高,因而暗与亮的物体的亮度差被拉大。The exponential function is used to stretch the specified pixel features of the pixels, and the specified pixel features of all pixels higher than the gradient factor can be stretched while forming a certain brightness difference. The set exponential function is monotonically increasing within the value range of the specified pixel feature. Therefore, the darker object corresponds to a lower target stretch value, and the brighter object corresponds to a higher target stretch value. The brightness difference from bright objects is widened.
可以理解,所用的指数函数具体不限,只要是能够实现亮度拉伸的同时能够形成一定的亮度差即可。当然,对像素的指定像素特征进行拉伸处理的方式也并不限于通过指数函数来实现,也可以是其他能够将高于渐变因子的像素的指定像素特征进行拉伸即可。It can be understood that the exponential function used is not particularly limited, as long as it can achieve brightness stretching and can form a certain brightness difference. Of course, the manner of performing the stretch processing on the designated pixel feature of the pixel is not limited to being implemented by an exponential function, and may also be another stretch capable of stretching the designated pixel feature of the pixel that is higher than the gradient factor.
在一个实施例中,继续参看图2,步骤S200中,所述依据目标视频帧的像素的指定像素特征及所述目标视频帧对应的渐变因子,对所述目标视频帧进行泛光处理,还包括:In one embodiment, referring to FIG. 2 continuously, in step S200, the target video frame is flooded according to the specified pixel characteristics of the pixels of the target video frame and the gradient factor corresponding to the target video frame. include:
S203:对拉伸处理后的所述目标视频帧进行模糊处理。S203: Perform blur processing on the target video frame after the stretching processing.
该步骤S203可以在步骤S201之后执行,处理器对目标视频帧整体进行模糊处理,可以将整个目标视频帧虚化,使得过渡效果更好。This step S203 may be performed after step S201. The processor performs blur processing on the entire target video frame, and may blur the entire target video frame to make the transition effect better.
具体模糊处理方式不限,例如可以是均值模糊、高斯模糊、中值模糊、二值模糊等,在模糊处理操作时也不限于一种模糊处理方式,可结合几种模糊处理方式操作。The specific blur processing method is not limited, for example, it can be mean blur, Gaussian blur, median blur, binary blur, etc. In the blur processing operation, it is not limited to one blur processing mode, and it can be combined with several blur processing modes.
优选的,步骤S203中,所述对拉伸处理后的所述目标视频帧进行模糊处理包括:对拉伸处理后的目标视频帧在水平和/或垂直方向进行高斯模糊处理。Preferably, in step S203, performing the blur processing on the target video frame after the stretching processing includes: performing Gaussian blur processing on the target video frame after the stretching processing in a horizontal and / or vertical direction.
由于图像是二维的,为减少计算量,进行可分离的高斯模糊计算,分别对目标视频帧在水平及垂直方向进行高斯模糊。可以先对目标视频帧按行做水平方向高斯模糊,再对水平方向模糊后的目标视频帧按列做垂直方向的高斯模糊;也可以先对目标视频帧在垂直方向上进行高斯模糊处理,再对目标视频帧在水平方向上进行高斯模糊处理。Since the image is two-dimensional, in order to reduce the amount of calculation, a separable Gaussian blur calculation is performed, and the target video frame is Gaussian blurred in the horizontal and vertical directions, respectively. You can first perform horizontal Gaussian blur on the target video frame in rows, and then perform vertical Gaussian blur on the target video frames after horizontal blurring. You can also perform Gaussian blur in the vertical direction on the target video frames, and then Gaussian blur processing is performed on the target video frame in the horizontal direction.
当然,也可以对目标视频帧仅在水平或垂直方向进行高斯模糊处理,具体不限。Of course, the target video frame can also be Gaussian-blurred only in the horizontal or vertical direction, which is not limited.
模糊处理可使得目标视频帧中相邻像素的指定像素特征更接近,使得人眼无法辨别像素之间的差别,从而转场过渡效果更自然。Blur processing can make the specified pixel characteristics of adjacent pixels closer in the target video frame, making it impossible for the human eye to distinguish the difference between the pixels, so that the transition effect is more natural.
在一个实施例中,继续参看图2,在对拉伸处理后的所述目标视频帧进行模糊处理之前,进一步包括:In one embodiment, referring to FIG. 2 before performing blur processing on the target video frame after the stretching processing, the method further includes:
S202:对拉伸处理后的目标视频帧进行下采样;S202: Downsampling the target video frame after stretching processing;
在对已拉伸处理的所述目标视频帧进行模糊处理之后,进一步包括:After performing blur processing on the stretched target video frame, the method further includes:
S204:对模糊处理后的目标视频帧进行上采样,以使上采样后的所述目标视频帧与下采样之前的目标视频帧具有相同尺寸。S204: Up-sampling the target video frame after the blur processing, so that the target video frame after the upsampling and the target video frame before the downsampling have the same size.
如图2,处理器执行的顺序可以是从步骤S201至步骤S204依次执行。As shown in FIG. 2, the execution order of the processor may be sequentially executed from step S201 to step S204.
在步骤S201中,处理器对目标视频帧的高于渐变因子的像素的指定像素特征进行拉伸后,执行步骤S202,处理器对拉伸处理后的目标视频帧进行下采样,下采样的目的是后续高斯模糊处理减少计算量,具体下采样后的尺寸不限。例如下采样是每两个像素中采样一个。In step S201, after the processor stretches the specified pixel characteristics of the pixel of the target video frame that is higher than the gradient factor, the processor executes step S202. The processor downsamples the target video frame after the stretching process. It is the subsequent Gaussian blurring to reduce the amount of calculation, and the size after specific downsampling is not limited. For example, downsampling is one in every two pixels.
在下采样完成之后,步骤S203中处理器将目标视频帧进行模糊处理,可参看前述关于模糊处理的内容,在此不再赘述。After the down-sampling is completed, the processor performs blur processing on the target video frame in step S203. For details, refer to the foregoing content about blur processing, and details are not described herein again.
接着在步骤S204中,处理器对模糊处理后的目标视频帧进行上采样,以使上采样后的所述目标视频帧与下采样之前的目标视频帧具有相同尺寸。例如在下采样是每两个像素中采样一个时,每个像素进行插值重建得到两个像素。Next, in step S204, the processor performs upsampling on the blurred target video frame, so that the target video frame after the upsampling and the target video frame before the downsampling have the same size. For example, when downsampling is sampling one out of every two pixels, each pixel is subjected to interpolation reconstruction to obtain two pixels.
利用OpenGl实现上采样和下采样几乎不花费计算量,但可降低了模糊处理的计算量,而且上采样的过程,事实上也可使得整个目标视频帧进一步模糊化。Using OpenGl to achieve up-sampling and down-sampling does not cost much calculation, but it can reduce the calculation of blurring processing, and the process of upsampling can actually further blur the entire target video frame.
在一个实施例中,在所述对模糊处理后的目标视频帧进行上采样之前,还包括以下步骤:In one embodiment, before the upsampling the blurred target video frame, the method further includes the following steps:
S205:针对目标视频帧中每一像素的指定像素特征,利用该指定像素特征和设定的指数函数确定该指定像素特征的目标拉伸值,将该像素的指定像素特征拉伸至所述目标拉伸值,以使所述目标视频帧整体拉伸。S205: For a specified pixel feature of each pixel in the target video frame, use the specified pixel feature and a set exponential function to determine a target stretch value of the specified pixel feature, and stretch the specified pixel feature of the pixel to the target. Stretch value to stretch the target video frame as a whole.
该步骤S205可以执行在步骤S203和S204之间,是在步骤S201已拉伸的基础上的进一步拉伸,不同的是,在步骤S205中,是对目标视频帧中所有像素的指定像素特征进行拉伸,即是对目标视频帧整体拉伸。This step S205 may be performed between steps S203 and S204, which is a further stretching based on the stretching in step S201. The difference is that in step S205, the specified pixel characteristics of all pixels in the target video frame are performed. Stretching is the overall stretching of the target video frame.
该设定的指数函数可以与步骤S201中的指数函数相同,当然也可以不同。若是相同,利用指数函数进行拉伸处理后,目标视频帧中所有像素的指定像素特征的最大值是一个接近1但是非1的值,为出现白光效果,需要进一步拉伸,例如可以进行加权以实现该进一步的拉伸,使得目标视频帧中的至少部分像素的指定像素特征为1。The set exponential function may be the same as the exponential function in step S201, but may be different. If it is the same, after using the exponential function to perform the stretching process, the maximum value of the specified pixel feature of all pixels in the target video frame is a value close to 1, but not 1. In order to appear a white light effect, further stretching is needed, for example, weighting can be performed to This further stretching is implemented so that the designated pixel feature of at least some pixels in the target video frame is 1.
换言之,步骤S205中的指数函数可以是对步骤S201中的指数函数进行加权得到的函数,该函数可以是一个单调递增函数,也可以是分段函数,具体不限,只要能够实现整体拉伸时,使得目标视频帧中的至少部分像素的指定像素特征为1。In other words, the exponential function in step S205 may be a function obtained by weighting the exponential function in step S201, and the function may be a monotonically increasing function or a piecewise function, which is not limited as long as the overall stretching can be achieved So that the designated pixel feature of at least some pixels in the target video frame is 1.
在一个实施例中,步骤S201中,所述对目标视频帧的所述像素的指定像 素特征进行拉伸处理包括:In one embodiment, in step S201, performing the stretching processing on the specified pixel feature of the pixel of the target video frame includes:
S2013:若所述目标视频帧的渐变因子为设定渐变因子,则修改所述目标视频帧的像素的指定像素特征为设定最大值,以使目标视频帧呈现全白画面。S2013: If the gradient factor of the target video frame is a set gradient factor, modify the specified pixel characteristics of the pixels of the target video frame to a set maximum value, so that the target video frame presents a completely white picture.
设定渐变因子例如为0,则目标视频帧的像素的指定像素特征均高于目标视频帧的渐变因子,将目标视频帧的像素的指定像素特征为设定最大值,例如是将R通道特征、G通道特征和B通道特征均拉伸到1,使得该目标视频帧呈现全白画面。If the gradient factor is set to 0, for example, the specified pixel characteristics of the pixels of the target video frame are higher than the gradient factor of the target video frame. The specified pixel characteristics of the pixels of the target video frame are set to the maximum value, such as the R channel characteristics , G-channel features and B-channel features are all stretched to 1 so that the target video frame appears completely white.
渐变因子为设定渐变因子的目标视频帧为从第一视频转至第二视频转场过程中,第一视频中的最后一帧或几帧,和/或第二视频的前一帧或几帧,将这类目标视频帧呈现为全白画面,可使得第一视频完全消失后第二视频再出现,衔接更自然。Gradient factor is to set the target video frame of the gradient factor to be the last frame or frames in the first video and / or the previous frame or frames in the second video during the transition from the first video to the second video. Frames, rendering such target video frames as completely white pictures can make the second video appear again after the first video completely disappears, and the connection is more natural.
在一个实施例中,该方法进一步包括以下步骤:In one embodiment, the method further includes the following steps:
S300:针对每一目标视频帧,若目标视频帧的像素的指定像素特征低于所述目标视频帧对应的渐变因子,则将目标视频帧的所述像素的指定像素特征修改为设定最小值。S300: For each target video frame, if the specified pixel characteristic of a pixel of the target video frame is lower than the gradient factor corresponding to the target video frame, modify the specified pixel characteristic of the pixel of the target video frame to a set minimum value .
若目标视频帧的像素的指定像素特征低于目标视频帧对应的渐变因子,说明这些像素对应的是较暗的物体,不需要进行泛光处理,则将目标视频帧的像素的指定像素特征修改为设定最小值,例如是将R通道特征、G通道特征和B通道特征均拉低到0,可进一步暗化。If the specified pixel characteristics of the pixels of the target video frame are lower than the corresponding gradient factor of the target video frame, it means that these pixels correspond to dark objects and do not need to be flooded. Then, modify the specified pixel characteristics of the pixels of the target video frame. To set the minimum value, for example, the R channel feature, G channel feature, and B channel feature are all lowered to 0, which can be further darkened.
该步骤S300可以在步骤S201之前或之后执行,或者可以与步骤S201同时执行,具体不限。This step S300 may be performed before or after step S201, or may be performed simultaneously with step S201, which is not limited in particular.
当然,也可以不需要将低于渐变因子的像素的指定像素特征修改为设定最小值,而是保留原值。Of course, it is not necessary to modify the specified pixel characteristics of the pixels below the gradient factor to a set minimum value, but to retain the original values.
在一个实施例中,依据目标视频帧的像素的指定像素特征及所述目标视频帧对应的渐变因子,对所述目标视频帧进行泛光处理后,还包括以下步骤:In one embodiment, after performing flood processing on the target video frame according to the specified pixel characteristics of the pixels of the target video frame and the gradient factor corresponding to the target video frame, the method further includes the following steps:
S400:将未泛光处理的目标视频帧与所述目标视频帧被泛光处理后得到的视频帧进行融合。S400: Fusion the target video frame that is not flooded with the video frame obtained after the target video frame is flooded.
该未泛光处理的目标视频帧可以是未做过任何处理的原始目标视频帧。The un-flooded target video frame may be the original target video frame without any processing.
该步骤S400可以在步骤S200执行完成之后、或者在步骤S300及步骤S200执行完成后执行,处理器将未泛光处理的目标视频帧与目标视频帧被泛光处理后得到的视频帧进行融合,融合后的视频帧作为最终呈现在转场过程中的视频帧,可在融合后实时显示在显示装置上。This step S400 may be performed after the execution of step S200 is completed, or after the execution of steps S300 and S200 is completed, the processor fuses the target video frame that is not flooded and the video frame obtained after the target video frame is flooded, The fused video frame is used as a video frame that is finally presented during the transition, and can be displayed on the display device in real time after the fusion.
优选的,所述将未泛光处理的目标视频帧与所述目标视频帧被泛光处理后得到的视频帧进行融合,包括:Preferably, the fusing the target video frame that is not flooded with the video frame obtained after the target video frame is flooded includes:
将未泛光处理的目标视频帧与所述目标视频帧被泛光处理后得到的视频帧中同一位置的像素叠加,叠加时各像素的指定像素特征取两者中的较大者。The pixel at the same position in the video frame obtained by flooding the target video frame and the video frame obtained by flooding the target video frame is superimposed, and the designated pixel characteristic of each pixel during the superimposition is the greater of the two.
即将未经泛光处理的目标视频帧和已经泛光处理的目标视频帧中,对应位置的像素的指定像素特征进行比较,以在未经泛光处理的目标视频帧上执行叠加为例,若未经泛光处理的目标视频帧的像素的指定像素特征较大,则该未经泛光处理的目标视频帧的该像素的指定像素特征不修改,若已经泛光处理的目标视频帧的像素的指定像素特征较大,则将该未经泛光处理的目标视频帧的该像素的指定像素特征修改为已经泛光处理的目标视频帧的该像素的指定像素特征。最终,将这些较大指定像素特征融合在了一帧视频帧上。That is, the specified pixel characteristics of the pixels at corresponding positions in the target video frame without flooding and the target video frame that has been flooded are compared, and the superposition is performed on the target video frame without flooding as an example. The specified pixel characteristics of the pixels of the target video frame that are not flooded are large, the specified pixel characteristics of the pixels of the target video frame that are not flooded are not modified. If the pixels of the target video frame that have been flooded are not If the specified pixel feature of the target is larger, the specified pixel feature of the pixel of the target video frame that has not been flooded is modified to the specified pixel feature of the pixel of the target video frame that has been flooded. Finally, these larger specified pixel features are fused on a video frame.
图3-6仅示出了从第一视频转至第二视频的过程中经本发明实施例的视频处理方法处理后的四个视频帧(按时间顺序排列),第一视频中的两个视频帧(图3和图4)泛光区域是逐帧增加的,但重要的对象(人等)是最后消失的,第二视频中的两个视频帧(图5和图6)泛光区域是逐帧减少的,重要的对象(人等)是最后出现的,如此可以使得将用户最感兴趣的对象保留的时间最久。Figure 3-6 shows only four video frames (arranged in chronological order) processed by the video processing method of the embodiment of the present invention during the transition from the first video to the second video, two of the first video The video frame (Figure 3 and Figure 4) flood area is increased frame by frame, but important objects (people, etc.) are finally disappeared. The two video frames in the second video (Figure 5 and Figure 6) flood area It is reduced on a frame-by-frame basis, and important objects (people, etc.) appear last, so that the objects that are most interesting to the user can be retained for the longest time.
基于与上述方法同样的构思,参见图7所示,本发明实施例中还提供一种电子设备100,包括:存储器101和处理器102(如一个或多个处理器);Based on the same concept as the above method, referring to FIG. 7, an embodiment of the present invention further provides an electronic device 100 including: a memory 101 and a processor 102 (such as one or more processors);
在一个实施例中,所述存储器,用于存储程序代码;所述处理器,用于调用所述程序代码,当所述程序代码被执行时,用于执行以下操作:In one embodiment, the memory is used to store program code; the processor is used to call the program code, and when the program code is executed, is used to perform the following operations:
在从第一视频转至第二视频的过程中,确定第一视频中的各目标视频帧 对应的渐变因子、和/或第二视频中的各目标视频帧对应的渐变因子;In the process of transferring from the first video to the second video, determining a gradient factor corresponding to each target video frame in the first video, and / or a gradient factor corresponding to each target video frame in the second video;
依据目标视频帧的像素的指定像素特征及所述目标视频帧对应的渐变因子,对所述目标视频帧进行泛光处理。Performing flood processing on the target video frame according to the specified pixel characteristics of the pixels of the target video frame and the gradient factor corresponding to the target video frame.
优选的,所述第一视频中的各目标视频帧的渐变因子递减;所述第二视频中的各目标视频帧的渐变因子递增;或者,Preferably, the gradient factor of each target video frame in the first video decreases; the gradient factor of each target video frame in the second video increases; or,
所述第一视频中的各目标视频帧的渐变因子递减至设定渐变因子后保持不变;所述第二视频中的前N个目标视频帧的渐变因子维持设定渐变因子,剩余目标视频帧的渐变因子递增。The gradient factor of each target video frame in the first video decreases to a set gradient factor and remains unchanged; the gradient factor of the first N target video frames in the second video maintains the set gradient factor, and the remaining target videos The frame's gradient factor is incremented.
优选的,所述N与所述第一视频中的渐变因子为所述设定渐变因子的目标视频帧的数量相等。Preferably, the number of the target video frames in which the gradient factor in the N and the first video is the set gradient factor is equal.
优选的,所述第一视频中的各目标视频帧的渐变因子递减时是按照线性递减的方式递减;Preferably, when the gradient factor of each target video frame in the first video is decreasing, it is decreasing in a linearly decreasing manner;
所述第二视频中的各目标视频帧的渐变因子递增时是按照线性递增的方式递增。When the gradation factor of each target video frame in the second video is increased, it is increased in a linearly increasing manner.
优选的,所述处理器依据目标视频帧的像素的指定像素特征及所述目标视频帧对应的渐变因子,对所述目标视频帧进行泛光处理时具体用于:Preferably, the processor is specifically configured to perform flooding processing on the target video frame according to specified pixel characteristics of pixels of the target video frame and a gradient factor corresponding to the target video frame:
针对每一目标视频帧,若目标视频帧的像素的指定像素特征高于所述目标视频帧对应的渐变因子,则对目标视频帧的所述像素的指定像素特征进行拉伸处理。For each target video frame, if the specified pixel feature of the pixel of the target video frame is higher than the gradient factor corresponding to the target video frame, the specified pixel feature of the pixel of the target video frame is stretched.
优选的,所述处理器对目标视频帧的所述像素的指定像素特征进行拉伸处理时具体用于:Preferably, when the processor performs a stretching process on a specified pixel feature of the pixel of the target video frame, the processor is specifically configured to:
利用设定的指数函数以及所述像素的指定像素特征确定目标拉伸值;Determining a target stretch value using a set exponential function and specified pixel characteristics of the pixel;
将所述像素的指定像素特征拉伸至所述目标拉伸值。Stretch a specified pixel feature of the pixel to the target stretch value.
优选的,所述处理依据目标视频帧的像素的指定像素特征及所述目标视频帧对应的渐变因子,对所述目标视频帧进行泛光处理时具体用于:Preferably, the processing is specifically used when performing flood processing on the target video frame according to the specified pixel characteristics of the pixels of the target video frame and the gradient factor corresponding to the target video frame:
对拉伸处理后的所述目标视频帧进行模糊处理。Performing blur processing on the target video frame after the stretching processing.
优选的,所述处理器对拉伸处理后的所述目标视频帧进行模糊处理时具 体用于:Preferably, when the processor performs blur processing on the target video frame after stretching processing, the processor is specifically configured to:
对拉伸处理后的目标视频帧在水平和/或垂直方向进行高斯模糊处理。Gaussian blur processing is performed on the target video frame after stretching in the horizontal and / or vertical direction.
优选的,所述处理器在对拉伸处理后的所述目标视频帧进行模糊处理之前,进一步用于:Preferably, before the processor performs blur processing on the target video frame after the stretching processing, the processor is further configured to:
对拉伸处理后的目标视频帧进行下采样;Downsampling the target video frame after stretching;
所述处理器在对已拉伸处理的所述目标视频帧进行模糊处理之后,进一步用于:After the processor performs blur processing on the stretched target video frame, the processor is further configured to:
对模糊处理后的目标视频帧进行上采样,以使上采样后的所述目标视频帧与下采样之前的目标视频帧具有相同尺寸。Upsampling the target video frame after the blur processing, so that the target video frame after the upsampling has the same size as the target video frame before the downsampling.
优选的,所述处理器在所述对模糊处理后的目标视频帧进行上采样之前,还用于:Preferably, before the processor performs up-sampling on the blurred target video frame, the processor is further configured to:
针对目标视频帧中每一像素的指定像素特征,利用该指定像素特征和设定的指数函数确定该指定像素特征的目标拉伸值,将该像素的指定像素特征拉伸至所述目标拉伸值,以使所述目标视频帧整体拉伸。For a specified pixel feature of each pixel in a target video frame, use the specified pixel feature and a set exponential function to determine a target stretch value of the specified pixel feature, and stretch the specified pixel feature of the pixel to the target stretch Value to stretch the target video frame as a whole.
优选的,所述处理器对目标视频帧的所述像素的指定像素特征进行拉伸处理时具体用于:Preferably, when the processor performs a stretching process on a specified pixel feature of the pixel of the target video frame, the processor is specifically configured to:
若所述目标视频帧的渐变因子为设定渐变因子,则修改所述目标视频帧的像素的指定像素特征为设定最大值,以使目标视频帧呈现全白画面。If the gradation factor of the target video frame is a set gradation factor, the specified pixel characteristic of the pixels of the target video frame is modified to a set maximum value, so that the target video frame presents a completely white picture.
优选的,所述处理器进一步用于:Preferably, the processor is further configured to:
针对每一目标视频帧,若目标视频帧的像素的指定像素特征低于所述目标视频帧对应的渐变因子,则将目标视频帧的所述像素的指定像素特征修改为设定最小值。For each target video frame, if the specified pixel characteristic of the pixel of the target video frame is lower than the gradient factor corresponding to the target video frame, the specified pixel characteristic of the pixel of the target video frame is modified to a set minimum value.
优选的,所述处理器依据目标视频帧的像素的指定像素特征及所述目标视频帧对应的渐变因子,对所述目标视频帧进行泛光处理后,还用于:Preferably, the processor is further configured to: after performing flood processing on the target video frame according to the specified pixel characteristics of the pixels of the target video frame and the gradient factor corresponding to the target video frame:
将未泛光处理的目标视频帧与所述目标视频帧被泛光处理后得到的视频帧进行融合。Fusion the target video frame without flooding processing with the video frame obtained after the target video frame is flooded.
优选的,所述处理器将未泛光处理的目标视频帧与所述目标视频帧被泛 光处理后得到的视频帧进行融合时具体用于:Preferably, when the processor fuses the target video frame that is not flooded and the video frame obtained after the target video frame is flooded, the processor is specifically configured to:
将未泛光处理的目标视频帧与所述目标视频帧被泛光处理后得到的视频帧中同一位置的像素叠加,叠加时各像素的指定像素特征取两者中的较大者。The pixel at the same position in the video frame obtained by flooding the target video frame and the video frame obtained by flooding the target video frame is superimposed, and the designated pixel characteristic of each pixel during the superimposition is the greater of the two.
优选的,所述指定像素特征包括以下至少一种:R通道特征、G通道特征和B通道特征。Preferably, the designated pixel feature includes at least one of the following: an R channel feature, a G channel feature, and a B channel feature.
基于与上述方法同样的发明构思,本发明实施例中还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机指令,所述计算机指令被执行时,实现前述实施例中所述的视频处理方法。Based on the same inventive concept as the above method, an embodiment of the present invention further provides a computer-readable storage medium. The computer-readable storage medium stores computer instructions. When the computer instructions are executed, the foregoing embodiments are implemented. The video processing method.
上述实施例阐明的***、装置、模块或单元,可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机,计算机的具体形式可以是个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件收发设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任意几种设备的组合。The system, device, module, or unit described in the foregoing embodiments may be implemented by a computer chip or entity, or by a product having a certain function. A typical implementation device is a computer, and the specific form of the computer may be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email sending and receiving device, and a game control Desk, tablet computer, wearable device, or a combination of any of these devices.
为了描述的方便,描述以上装置时以功能分为各种单元分别描述。当然,在实施本发明时可以把各单元的功能在同一个或多个软件和/或硬件中实现。For the convenience of description, when describing the above device, the functions are divided into various units and described separately. Of course, when implementing the present invention, the functions of the units may be implemented in the same or multiple software and / or hardware.
本领域内的技术人员应明白,本发明实施例可提供为方法、***、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present invention may be provided as a method, a system, or a computer program product. Therefore, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
本发明是参照根据本发明实施例的方法、设备(***)、和计算机程序产品的流程图和/或方框图来描述的。应理解可以由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其它可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其它可编程数据处理设备的处理器执行的指令产生用于实现在流程图 一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, and combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, so that instructions generated by the processor of the computer or other programmable data processing device may be used to generate instructions. Means for implementing the functions specified in one or more flowcharts and / or one or more blocks of the block diagrams.
而且,这些计算机程序指令也可以存储在能引导计算机或其它可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或者多个流程和/或方框图一个方框或者多个方框中指定的功能。Moreover, these computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured article including the instruction device, The instruction device implements the functions specified in a flowchart or a plurality of processes and / or a block or a block of the block diagram.
这些计算机程序指令也可装载到计算机或其它可编程数据处理设备,使得在计算机或者其它可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其它可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded into a computer or other programmable data processing device, so that a series of operating steps are performed on the computer or other programmable device to produce a computer-implemented process, and the instructions executed on the computer or other programmable device Provides steps for implementing the functions specified in one or more flowcharts and / or one or more blocks of the block diagrams.
以上所述仅为本发明实施例而已,并不用于限制本发明。对于本领域技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原理之内所作的任何修改、等同替换、改进,均应包含在本发明的权利要求范围之内。The above description is only an embodiment of the present invention, and is not intended to limit the present invention. It will be apparent to those skilled in the art that various modifications and variations can be made in the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall be included in the scope of the claims of the present invention.

Claims (31)

  1. 一种视频处理方法,其特征在于,包括:A video processing method, comprising:
    在从第一视频转至第二视频的过程中,确定第一视频中的各目标视频帧对应的渐变因子、和/或第二视频中的各目标视频帧对应的渐变因子;In the process of transferring from the first video to the second video, determining a gradient factor corresponding to each target video frame in the first video, and / or a gradient factor corresponding to each target video frame in the second video;
    依据目标视频帧的像素的指定像素特征及所述目标视频帧对应的渐变因子,对所述目标视频帧进行泛光处理。Performing flood processing on the target video frame according to the specified pixel characteristics of the pixels of the target video frame and the gradient factor corresponding to the target video frame.
  2. 如权利要求1所述的视频处理方法,其特征在于,所述第一视频中的各目标视频帧的渐变因子递减;所述第二视频中的各目标视频帧的渐变因子递增;或者,The video processing method according to claim 1, wherein the gradient factor of each target video frame in the first video decreases; the gradient factor of each target video frame in the second video increases; or,
    所述第一视频中的各目标视频帧的渐变因子递减至设定渐变因子后保持不变;所述第二视频中的前N个目标视频帧的渐变因子维持设定渐变因子,剩余目标视频帧的渐变因子递增。The gradient factor of each target video frame in the first video decreases to a set gradient factor and remains unchanged; the gradient factor of the first N target video frames in the second video maintains the set gradient factor, and the remaining target videos The frame's gradient factor is incremented.
  3. 如权利要求2所述的视频处理方法,其特征在于,所述N与所述第一视频中的渐变因子为所述设定渐变因子的目标视频帧的数量相等。The video processing method according to claim 2, wherein the number of the target video frames in which the gradient factor in the N and the first video is the set gradient factor is equal.
  4. 如权利要求2所述的视频处理方法,其特征在于,所述第一视频中的各目标视频帧的渐变因子递减时是按照线性递减的方式递减;The video processing method according to claim 2, characterized in that, when the gradation factor of each target video frame in the first video decreases, it decreases in a linear decreasing manner;
    所述第二视频中的各目标视频帧的渐变因子递增时是按照线性递增的方式递增。When the gradation factor of each target video frame in the second video is increased, it is increased in a linearly increasing manner.
  5. 如权利要求1所述的视频处理方法,其特征在于,所述依据目标视频帧的像素的指定像素特征及所述目标视频帧对应的渐变因子,对所述目标视频帧进行泛光处理,包括:The video processing method according to claim 1, wherein performing flood processing on the target video frame according to the specified pixel characteristics of the pixels of the target video frame and the gradient factor corresponding to the target video frame, comprising: :
    针对每一目标视频帧,若目标视频帧的像素的指定像素特征高于所述目标视频帧对应的渐变因子,则对目标视频帧的所述像素的指定像素特征进行拉伸处理。For each target video frame, if the specified pixel feature of the pixel of the target video frame is higher than the gradient factor corresponding to the target video frame, the specified pixel feature of the pixel of the target video frame is stretched.
  6. 如权利要求5所述的视频处理方法,其特征在于,所述对目标视频帧的所述像素的指定像素特征进行拉伸处理包括:The video processing method according to claim 5, wherein the performing stretch processing on the specified pixel characteristics of the pixels of the target video frame comprises:
    利用设定的指数函数以及所述像素的指定像素特征确定目标拉伸值;Determining a target stretch value using a set exponential function and specified pixel characteristics of the pixel;
    将所述像素的指定像素特征拉伸至所述目标拉伸值。Stretch a specified pixel feature of the pixel to the target stretch value.
  7. 如权利要求5所述的视频处理方法,其特征在于,所述依据目标视频帧的像素的指定像素特征及所述目标视频帧对应的渐变因子,对所述目标视频帧进行泛光处理,还包括:The video processing method according to claim 5, wherein the flooding processing is performed on the target video frame according to the specified pixel characteristics of the pixels of the target video frame and the gradient factor corresponding to the target video frame, and include:
    对拉伸处理后的所述目标视频帧进行模糊处理。Performing blur processing on the target video frame after the stretching processing.
  8. 如权利要求7所述的视频处理方法,其特征在于,所述对拉伸处理后的所述目标视频帧进行模糊处理包括:The video processing method according to claim 7, wherein the blurring the target video frame after stretching processing comprises:
    对拉伸处理后的目标视频帧在水平和/或垂直方向进行高斯模糊处理。Gaussian blur processing is performed on the target video frame after stretching in the horizontal and / or vertical direction.
  9. 如权利要求7或8所述的视频处理方法,其特征在于,在对拉伸处理后的所述目标视频帧进行模糊处理之前,进一步包括:The video processing method according to claim 7 or 8, before performing blur processing on the target video frame after the stretching processing, further comprising:
    对拉伸处理后的目标视频帧进行下采样;Downsampling the target video frame after stretching;
    在对已拉伸处理的所述目标视频帧进行模糊处理之后,进一步包括:After performing blur processing on the stretched target video frame, the method further includes:
    对模糊处理后的目标视频帧进行上采样,以使上采样后的所述目标视频帧与下采样之前的目标视频帧具有相同尺寸。Upsampling the target video frame after the blur processing, so that the target video frame after the upsampling has the same size as the target video frame before the downsampling.
  10. 如权利要求9所述的视频处理方法,其特征在于,在所述对模糊处理后的目标视频帧进行上采样之前,还包括:The video processing method according to claim 9, before the upsampling the target video frame after blurring processing, further comprising:
    针对目标视频帧中每一像素的指定像素特征,利用该指定像素特征和设定的指数函数确定该指定像素特征的目标拉伸值,将该像素的指定像素特征拉伸至所述目标拉伸值,以使所述目标视频帧整体拉伸。For a specified pixel feature of each pixel in a target video frame, use the specified pixel feature and a set exponential function to determine a target stretch value of the specified pixel feature, and stretch the specified pixel feature of the pixel to the target stretch. Value to stretch the target video frame as a whole.
  11. 如权利要求5所述的视频处理方法,其特征在于,所述对目标视频帧的所述像素的指定像素特征进行拉伸处理包括:The video processing method according to claim 5, wherein the performing stretch processing on the specified pixel characteristics of the pixels of the target video frame comprises:
    若所述目标视频帧的渐变因子为设定渐变因子,则修改所述目标视频帧的像素的指定像素特征为设定最大值,以使目标视频帧呈现全白画面。If the gradation factor of the target video frame is a set gradation factor, modifying the designated pixel characteristic of the pixels of the target video frame to a set maximum value, so that the target video frame presents a completely white picture.
  12. 如权利要求5所述的视频处理方法,其特征在于,该方法进一步包括:The video processing method according to claim 5, further comprising:
    针对每一目标视频帧,若目标视频帧的像素的指定像素特征低于所述目标视频帧对应的渐变因子,则将目标视频帧的所述像素的指定像素特征修改为设定最小值。For each target video frame, if the specified pixel characteristic of the pixel of the target video frame is lower than the gradient factor corresponding to the target video frame, the specified pixel characteristic of the pixel of the target video frame is modified to a set minimum value.
  13. 如权利要求1-12中任一所述的视频处理方法,其特征在于,依据目标视频帧的像素的指定像素特征及所述目标视频帧对应的渐变因子,对所述目标视频帧进行泛光处理后,还包括:The video processing method according to any one of claims 1-12, wherein the target video frame is flooded according to the specified pixel characteristics of the pixels of the target video frame and the gradient factor corresponding to the target video frame. After processing, it also includes:
    将未泛光处理的目标视频帧与所述目标视频帧被泛光处理后得到的视频帧进行融合。Fusion the target video frame without flooding processing with the video frame obtained after the target video frame is flooded.
  14. 如权利要求13所述的视频处理方法,其特征在于,所述将未泛光处理的目标视频帧与所述目标视频帧被泛光处理后得到的视频帧进行融合,包括:The video processing method according to claim 13, wherein the fusing a target video frame that has not been flooded with a video frame obtained after the target video frame is flooded comprises:
    将未泛光处理的目标视频帧与所述目标视频帧被泛光处理后得到的视频帧中同一位置的像素叠加,叠加时各像素的指定像素特征取两者中的较大者。The pixel at the same position in the video frame obtained by flooding the target video frame and the video frame obtained by flooding the target video frame is superimposed, and the designated pixel characteristic of each pixel during the superimposition is the greater of the two.
  15. 如权利要求1至14任一所述的视频处理方法,其特征在于,所述指定像素特征包括以下至少一种:R通道特征、G通道特征和B通道特征。The video processing method according to any one of claims 1 to 14, wherein the designated pixel feature comprises at least one of the following: an R channel feature, a G channel feature, and a B channel feature.
  16. 一种电子设备,其特征在于,包括:存储器和处理器;An electronic device, comprising: a memory and a processor;
    所述存储器,用于存储程序代码;The memory is used to store program code;
    所述处理器,用于调用所述程序代码,当所述程序代码被执行时,用于执行以下操作:The processor is configured to call the program code, and when the program code is executed, is configured to perform the following operations:
    在从第一视频转至第二视频的过程中,确定第一视频中的各目标视频帧对应的渐变因子、和/或第二视频中的各目标视频帧对应的渐变因子;In the process of transferring from the first video to the second video, determining a gradient factor corresponding to each target video frame in the first video, and / or a gradient factor corresponding to each target video frame in the second video;
    依据目标视频帧的像素的指定像素特征及所述目标视频帧对应的渐变因子,对所述目标视频帧进行泛光处理。Performing flood processing on the target video frame according to the specified pixel characteristics of the pixels of the target video frame and the gradient factor corresponding to the target video frame.
  17. 如权利要求16所述的电子设备,其特征在于,所述第一视频中的各目标视频帧的渐变因子递减;所述第二视频中的各目标视频帧的渐变因子递增;或者,The electronic device according to claim 16, wherein the gradient factor of each target video frame in the first video decreases; the gradient factor of each target video frame in the second video increases; or,
    所述第一视频中的各目标视频帧的渐变因子递减至设定渐变因子后保持不变;所述第二视频中的前N个目标视频帧的渐变因子维持设定渐变因子,剩余目标视频帧的渐变因子递增。The gradient factor of each target video frame in the first video decreases to a set gradient factor and remains unchanged; the gradient factor of the first N target video frames in the second video maintains the set gradient factor, and the remaining target videos The frame's gradient factor is incremented.
  18. 如权利要求17所述的电子设备,其特征在于,所述N与所述第一视频中的渐变因子为所述设定渐变因子的目标视频帧的数量相等。The electronic device according to claim 17, wherein the number of the target video frames in which the gradient factor in the N and the first video is the set gradient factor is equal.
  19. 如权利要求17所述的电子设备,其特征在于,所述第一视频中的各目标视频帧的渐变因子递减时是按照线性递减的方式递减;The electronic device according to claim 17, wherein when the gradation factor of each target video frame in the first video decreases, it decreases in a linear decreasing manner;
    所述第二视频中的各目标视频帧的渐变因子递增时是按照线性递增的方式递增。When the gradation factor of each target video frame in the second video is increased, it is increased in a linearly increasing manner.
  20. 如权利要求16所述的电子设备,其特征在于,所述处理器依据目标视频帧的像素的指定像素特征及所述目标视频帧对应的渐变因子,对所述目标视频帧进行泛光处理时具体用于:The electronic device according to claim 16, wherein the processor performs flooding processing on the target video frame according to the specified pixel characteristics of the pixels of the target video frame and the gradient factor corresponding to the target video frame. Specifically used for:
    针对每一目标视频帧,若目标视频帧的像素的指定像素特征高于所述目标视频帧对应的渐变因子,则对目标视频帧的所述像素的指定像素特征进行拉伸处理。For each target video frame, if the specified pixel feature of the pixel of the target video frame is higher than the gradient factor corresponding to the target video frame, the specified pixel feature of the pixel of the target video frame is stretched.
  21. 如权利要求20所述的电子设备,其特征在于,所述处理器对目标视频帧的所述像素的指定像素特征进行拉伸处理时具体用于:The electronic device according to claim 20, wherein the processor is specifically configured to: when performing stretch processing on the specified pixel feature of the pixel of the target video frame:
    利用设定的指数函数以及所述像素的指定像素特征确定目标拉伸值;Determining a target stretch value using a set exponential function and specified pixel characteristics of the pixel;
    将所述像素的指定像素特征拉伸至所述目标拉伸值。Stretch a specified pixel feature of the pixel to the target stretch value.
  22. 如权利要求20所述的电子设备,其特征在于,所述处理依据目标视频帧的像素的指定像素特征及所述目标视频帧对应的渐变因子,对所述目标视频帧进行泛光处理时具体用于:The electronic device according to claim 20, wherein the processing is specific when performing flooding processing on the target video frame according to the specified pixel characteristics of the pixels of the target video frame and the gradient factor corresponding to the target video frame. Used for:
    对拉伸处理后的所述目标视频帧进行模糊处理。Performing blur processing on the target video frame after the stretching processing.
  23. 如权利要求22所述的电子设备,其特征在于,所述处理器对拉伸处理后的所述目标视频帧进行模糊处理时具体用于:The electronic device according to claim 22, wherein the processor is specifically configured to perform blur processing on the target video frame after the stretching processing:
    对拉伸处理后的目标视频帧在水平和/或垂直方向进行高斯模糊处理。Gaussian blur processing is performed on the target video frame after stretching in the horizontal and / or vertical direction.
  24. 如权利要求22或23所述的电子设备,其特征在于,所述处理器在对拉伸处理后的所述目标视频帧进行模糊处理之前,进一步用于:The electronic device according to claim 22 or 23, wherein before the processor performs blur processing on the target video frame after the stretching processing, the processor is further configured to:
    对拉伸处理后的目标视频帧进行下采样;Downsampling the target video frame after stretching;
    所述处理器在对已拉伸处理的所述目标视频帧进行模糊处理之后,进一步用于:After the processor performs blur processing on the stretched target video frame, the processor is further configured to:
    对模糊处理后的目标视频帧进行上采样,以使上采样后的所述目标视频 帧与下采样之前的目标视频帧具有相同尺寸。Upsampling the target video frame after the blur processing, so that the target video frame after the upsampling has the same size as the target video frame before the downsampling.
  25. 如权利要求24所述的电子设备,其特征在于,所述处理器在所述对模糊处理后的目标视频帧进行上采样之前,还用于:The electronic device according to claim 24, wherein before the processor performs up-sampling on the blurred target video frame, the processor is further configured to:
    针对目标视频帧中每一像素的指定像素特征,利用该指定像素特征和设定的指数函数确定该指定像素特征的目标拉伸值,将该像素的指定像素特征拉伸至所述目标拉伸值,以使所述目标视频帧整体拉伸。For a specified pixel feature of each pixel in a target video frame, use the specified pixel feature and a set exponential function to determine a target stretch value of the specified pixel feature, and stretch the specified pixel feature of the pixel to the target stretch. Value to stretch the target video frame as a whole.
  26. 如权利要求20所述的电子设备,其特征在于,所述处理器对目标视频帧的所述像素的指定像素特征进行拉伸处理时具体用于:The electronic device according to claim 20, wherein the processor is specifically configured to: when performing stretch processing on the specified pixel feature of the pixel of the target video frame:
    若所述目标视频帧的渐变因子为设定渐变因子,则修改所述目标视频帧的像素的指定像素特征为设定最大值,以使目标视频帧呈现全白画面。If the gradation factor of the target video frame is a set gradation factor, the specified pixel characteristic of the pixels of the target video frame is modified to a set maximum value, so that the target video frame presents a completely white picture.
  27. 如权利要求20所述的电子设备,其特征在于,所述处理器进一步用于:The electronic device according to claim 20, wherein the processor is further configured to:
    针对每一目标视频帧,若目标视频帧的像素的指定像素特征低于所述目标视频帧对应的渐变因子,则将目标视频帧的所述像素的指定像素特征修改为设定最小值。For each target video frame, if the specified pixel characteristic of the pixel of the target video frame is lower than the gradient factor corresponding to the target video frame, the specified pixel characteristic of the pixel of the target video frame is modified to a set minimum value.
  28. 如权利要求16-27中任一所述的电子设备,其特征在于,所述处理器依据目标视频帧的像素的指定像素特征及所述目标视频帧对应的渐变因子,对所述目标视频帧进行泛光处理后,还用于:The electronic device according to any one of claims 16 to 27, wherein the processor performs a step on the target video frame according to a specified pixel characteristic of a pixel of the target video frame and a gradient factor corresponding to the target video frame. After flooding, it is also used for:
    将未泛光处理的目标视频帧与所述目标视频帧被泛光处理后得到的视频帧进行融合。Fusion the target video frame without flooding processing with the video frame obtained after the target video frame is flooded.
  29. 如权利要求28所述的电子设备,其特征在于,所述处理器将未泛光处理的目标视频帧与所述目标视频帧被泛光处理后得到的视频帧进行融合时具体用于:The electronic device according to claim 28, wherein when the processor fuses the target video frame that is not flooded and the video frame obtained after the target video frame is flooded, the processor is specifically configured to:
    将未泛光处理的目标视频帧与所述目标视频帧被泛光处理后得到的视频帧中同一位置的像素叠加,叠加时各像素的指定像素特征取两者中的较大者。The pixel at the same position in the video frame obtained by flooding the target video frame and the video frame obtained by flooding the target video frame is superimposed, and the designated pixel characteristic of each pixel during the superimposition is the greater of the two.
  30. 如权利要求16至29任一所述的电子设备,其特征在于,所述指定像素特征包括以下至少一种:R通道特征、G通道特征和B通道特征。The electronic device according to any one of claims 16 to 29, wherein the designated pixel feature comprises at least one of the following: an R channel feature, a G channel feature, and a B channel feature.
  31. 一种计算机可读存储介质,其特征在于,A computer-readable storage medium, characterized in that:
    所述计算机可读存储介质上存储有计算机指令,所述计算机指令被执行时,实现权利要求1-15任一项所述的视频处理方法。Computer instructions are stored on the computer-readable storage medium, and when the computer instructions are executed, the video processing method according to any one of claims 1-15 is implemented.
PCT/CN2018/096847 2018-07-24 2018-07-24 Video processing method and device, and computer-readable storage medium WO2020019164A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201880039251.7A CN110786002B (en) 2018-07-24 2018-07-24 Video processing method, device and computer readable storage medium
PCT/CN2018/096847 WO2020019164A1 (en) 2018-07-24 2018-07-24 Video processing method and device, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/096847 WO2020019164A1 (en) 2018-07-24 2018-07-24 Video processing method and device, and computer-readable storage medium

Publications (1)

Publication Number Publication Date
WO2020019164A1 true WO2020019164A1 (en) 2020-01-30

Family

ID=69181054

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/096847 WO2020019164A1 (en) 2018-07-24 2018-07-24 Video processing method and device, and computer-readable storage medium

Country Status (2)

Country Link
CN (1) CN110786002B (en)
WO (1) WO2020019164A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112312201A (en) * 2020-04-09 2021-02-02 北京沃东天骏信息技术有限公司 Method, system, device and storage medium for video transition

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113542847B (en) * 2020-04-21 2023-05-02 抖音视界有限公司 Image display method, device, equipment and storage medium
CN112749613B (en) * 2020-08-27 2024-03-26 腾讯科技(深圳)有限公司 Video data processing method, device, computer equipment and storage medium
WO2022252080A1 (en) * 2021-05-31 2022-12-08 Huawei Technologies Co.,Ltd. Apparatus and method for generating a bloom effect
CN114998479B (en) * 2022-08-08 2022-10-18 江阴市晶磁电子有限公司 Gradual change image scene machine control processing system and method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020126224A1 (en) * 2000-12-28 2002-09-12 Rainer Lienhart System for detection of transition and special effects in video
CN103971713A (en) * 2014-05-07 2014-08-06 厦门美图之家科技有限公司 Video file filter processing method
CN104144301A (en) * 2014-07-30 2014-11-12 厦门美图之家科技有限公司 Method for transition special effects on basis of mixed modes
CN106210531A (en) * 2016-07-29 2016-12-07 广东欧珀移动通信有限公司 Video generation method, device and mobile terminal

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5812216A (en) * 1994-04-19 1998-09-22 Avid Technology, Inc. Method and apparatus for creating motion picture transitions according to non-linear light response
CN1547382A (en) * 2003-12-02 2004-11-17 深圳创维-Rgb电子有限公司 A method of television set channel switching
JP2009027550A (en) * 2007-07-20 2009-02-05 Funai Electric Co Ltd Video signal processing apparatus
CN103024559B (en) * 2012-11-09 2016-04-13 小米科技有限责任公司 A kind of method of Switch Video, device and equipment
CN103984553B (en) * 2014-05-26 2017-10-24 中科创达软件股份有限公司 A kind of 3D desktop display methods and system
CN107124624B (en) * 2017-04-21 2022-09-23 腾讯科技(深圳)有限公司 Method and device for generating video data
CN108024071B (en) * 2017-11-24 2022-03-08 腾讯数码(天津)有限公司 Video content generation method, video content generation device, and storage medium
CN108038896B (en) * 2017-12-06 2021-06-11 北京像素软件科技股份有限公司 Halo gradual change realization method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020126224A1 (en) * 2000-12-28 2002-09-12 Rainer Lienhart System for detection of transition and special effects in video
CN103971713A (en) * 2014-05-07 2014-08-06 厦门美图之家科技有限公司 Video file filter processing method
CN104144301A (en) * 2014-07-30 2014-11-12 厦门美图之家科技有限公司 Method for transition special effects on basis of mixed modes
CN106210531A (en) * 2016-07-29 2016-12-07 广东欧珀移动通信有限公司 Video generation method, device and mobile terminal

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112312201A (en) * 2020-04-09 2021-02-02 北京沃东天骏信息技术有限公司 Method, system, device and storage medium for video transition
CN112312201B (en) * 2020-04-09 2023-04-07 北京沃东天骏信息技术有限公司 Method, system, device and storage medium for video transition

Also Published As

Publication number Publication date
CN110786002A (en) 2020-02-11
CN110786002B (en) 2022-02-25

Similar Documents

Publication Publication Date Title
WO2020019164A1 (en) Video processing method and device, and computer-readable storage medium
US9934562B2 (en) Method for dynamic range editing
US11120528B1 (en) Artificial aperture adjustment for synthetic depth of field rendering
US10410327B2 (en) Shallow depth of field rendering
US9019310B2 (en) Methods and apparatus for applying complex continuous gradients to images
WO2018032783A1 (en) Image processing method and apparatus
CN107948733B (en) Video image processing method and device and electronic equipment
CN108022223B (en) Tone mapping method based on logarithm mapping function blocking processing fusion
JP2008501170A (en) Method and system for viewing and enhancing images
CN103440674B (en) A kind of rapid generation of digital picture wax crayon specially good effect
TWI345418B (en) Brightness adjusting methods for video frames of video sequence and brightness adjusting devices thereof
US20140078170A1 (en) Image processing apparatus and method, and program
KR20200043432A (en) Technology for providing virtual lighting adjustments to image data
CN112561777A (en) Method and device for adding light spots to image
CN110706162A (en) Image processing method and device and computer storage medium
CN111161685B (en) Virtual reality display equipment and control method thereof
KR20230074136A (en) Salience-based capture or image processing
CN114926351B (en) Image processing method, electronic device, and computer storage medium
US20240205376A1 (en) Image processing method and apparatus, computer device, and storage medium
CN114841853A (en) Image processing method, device, equipment and storage medium
CN109859303B (en) Image rendering method and device, terminal equipment and readable storage medium
US10114447B2 (en) Image processing method and apparatus for operating in low-power mode
WO2021008322A1 (en) Image processing method, apparatus, and device
CN110225177B (en) Interface adjusting method, computer storage medium and terminal equipment
KR102214439B1 (en) Image processing Method and apparatus for low-power mode

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: 18928068

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18928068

Country of ref document: EP

Kind code of ref document: A1