WO2022077978A1 - 视频处理方法和视频处理装置 - Google Patents

视频处理方法和视频处理装置 Download PDF

Info

Publication number
WO2022077978A1
WO2022077978A1 PCT/CN2021/106339 CN2021106339W WO2022077978A1 WO 2022077978 A1 WO2022077978 A1 WO 2022077978A1 CN 2021106339 W CN2021106339 W CN 2021106339W WO 2022077978 A1 WO2022077978 A1 WO 2022077978A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
frame image
current frame
result
result image
Prior art date
Application number
PCT/CN2021/106339
Other languages
English (en)
French (fr)
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 MX2022007387A priority Critical patent/MX2022007387A/es
Priority to EP21879026.9A priority patent/EP4060602A1/en
Publication of WO2022077978A1 publication Critical patent/WO2022077978A1/zh
Priority to US17/742,466 priority patent/US11538141B2/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/77Retouching; Inpainting; Scratch removal
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/30Determination of transform parameters for the alignment of images, i.e. image registration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/30Determination of transform parameters for the alignment of images, i.e. image registration
    • G06T7/33Determination of transform parameters for the alignment of images, i.e. image registration using feature-based methods
    • G06T7/337Determination of transform parameters for the alignment of images, i.e. image registration using feature-based methods involving reference images or patches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/30Determination of transform parameters for the alignment of images, i.e. image registration
    • G06T7/35Determination of transform parameters for the alignment of images, i.e. image registration using statistical methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/46Extracting features or characteristics from the video content, e.g. video fingerprints, representative shots or key frames
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence

Definitions

  • an image processing network may be used to obtain a first result image of the current frame image based on the current frame image and the first region mask, wherein the first result image is in the current frame image The image of the first region is removed.
  • the image processing network can be any neural network based on single-image image inpainting (eg, deep convolutional neural network, etc.).
  • the image processing network can also be a network model trained specifically.
  • the second result image of the previous frame image utilized by the fusion mechanism may include at least one of the third result image and the fourth result image of the previous frame image.
  • the third result image of the previous frame image is obtained by using the image processing network based on the previous frame image and the first area mask;
  • the fourth result image of the previous frame image is obtained by comparing the previous frame image
  • the first result image of the image is obtained by fusing the fifth result image of a frame image before the previous frame image.
  • Calculate to obtain the second adjacent optical flow sample the first result image of the current frame image and the third result image of the previous frame image based on the first adjacent optical flow to obtain the first adjacent frame alignment image, and based on The second adjacent optical flow samples the first result image of the current frame image and the fourth result image of the previous frame image to obtain the second adjacent frame alignment image; Each pixel of the first area pixel of the first adjacent frame-aligned image and the second adjacent frame-aligned image is fused.
  • the first result image of the current frame (generated by frame t) and the third result image of the previous frame (generated by frame t-1) can be subjected to optical flow calculation and sampling to obtain the alignment image of the first adjacent frame ( t-1 frame generation and propagation), and can perform optical flow calculation and sampling on the first result image of the current frame (t frame generation) and the fourth result image of the previous frame (t-1 frame result) to obtain the second phase. Neighboring frame aligned images (t-1 frame result propagation). Subsequently, the first result image of the current frame image (t frame generation), the first adjacent frame alignment image (t-1 frame generation and propagation) and the second adjacent frame alignment image (t-1 frame result propagation) Each pixel of a region of pixels is fused.
  • the median of the pixel value of the first result image of the current frame image, the pixel value of the aligned image of the first adjacent frame, and the pixel value of the aligned image of the second adjacent frame may be calculated.
  • the number is taken as the pixel value of the pixel, so that the fused image, that is, the final result image of the current frame image, can be obtained.
  • steps 203 and 204 are not performed, and the current frame image obtained in step 202 can be used.
  • the first result image of the frame image is used as the final result image of the current frame image.
  • the difference may be based on the L2 norm distance of the predetermined image patch.
  • the L2 norm distance between each pixel of two adjacent frames can be calculated by the following formula:
  • the integral graph can also be used to accelerate the algorithm, so as to improve the speed of the algorithm.
  • images of two adjacent frames after alignment may have large deviations. Therefore, after the final result image of the current frame image is generated in step 202 or the final result image of the current frame image is generated in step 204 according to the video processing method of the present disclosure, background fusion can also be performed on the final result image of the current frame image, so that the current The filling content of the first area of the frame image can be more perfectly and more naturally blended with the background of the current frame image, so that the resulting image is more harmonious and natural.
  • background fusion may be performed using a Poisson fusion algorithm. That is, based on the current frame image, the final result image of the current frame image, and the first region mask, using the Poisson fusion algorithm, the sixth result image of the current frame image is obtained as the final result image of the current frame image.
  • the first area in the first area mask can be used as a reference area, and the difference between the pixel value of the pixel of the current frame image and the pixel value of the pixel of the final result image of the current frame image at the boundary of the reference area can be calculated.
  • the pixel value of the pixel of the final result image of the current frame image at the boundary of the reference area can be adjusted until the gradient is minimized; the final result image of the adjusted current frame image when the gradient is minimized is used as the current frame Image of the sixth result image.
  • FIG. 7 is a schematic flowchart illustrating a video processing method according to an exemplary embodiment of the present disclosure.
  • the image frame of the video to be processed and the corresponding first region mask can be input into an image processing network based on a single-frame image to obtain a result image based on single-frame padding (for example, the above-mentioned first result image image), then, a fusion algorithm of adjacent frames before and after the result image based on single-frame padding can be performed to obtain a result image based on fusion padding (for example, the above-mentioned second result image), and then, the result image based on fusion padding can be The image is subjected to background fusion to obtain a result image (eg, the sixth result image above) based on the background fusion, which is output as a final result image.
  • a result image based on single-frame padding for example, the above-mentioned first result image image
  • a fusion algorithm of adjacent frames before and after the result image based on single-frame padding can be performed to obtain a result image based on fusion padding (for example, the above-mentioned second result image)
  • FIG. 8 is a block diagram illustrating a video processing apparatus according to an exemplary embodiment of the present disclosure.
  • a video processing apparatus 800 may include an acquisition unit 801 , a processing unit 802 and a fusion unit 803 .
  • the obtaining unit 801 can obtain the current frame image and the first region mask of the video.
  • the video refers to the video to be processed, for example, it may be a video obtained by a video platform and captured by a camera, or a video from other video platforms, or a video from a network or local storage, and so on.
  • the video processing method according to the exemplary embodiment of the present disclosure may perform processing for each frame of the video to be processed, and thus, the current frame refers to the frame currently being processed.
  • the first area mask refers to an image mask that blocks areas other than a predetermined area to be processed in the image of the video to be processed.
  • the area to be processed (hereinafter, referred to as the first area for short) may be a larger area than the image to be removed, because using the semantic information of the surrounding background of the image to be removed is more conducive to improving the quality of the filling content.
  • an appropriate first area should be selected as the reference area of the context. If the first area is too large, too much irrelevant information will be introduced, which will make the processing model troublesome, and if the first area is too small, it cannot contain valid reference information. , which affects the processing effect.
  • the first area may be a predetermined area including a pattern to be processed, and the predetermined area is a partial area of an image of a video to be processed.
  • the first area may be a specific rectangular area in the image of the video to be processed, and the specific rectangular area takes the center of the pattern to be processed in the image of the video to be processed as the center point and takes twice the longest side of the pattern to be processed as the side long.
  • the first region according to the present disclosure is not limited to the above, and can also be any possible first region.
  • the processing unit 802 may obtain a first result image of the current frame image by using an image processing network based on the current frame image and the first region mask.
  • the image processing network can be any neural network based on single-image image inpainting (eg, deep convolutional neural network, etc.).
  • the image processing network can also be a network model trained specifically.
  • the processing unit 802 may adopt a deep convolutional neural network from coarse to fine, the rough inpainting in the first stage completes the filling of the rough outline, and the fine inpainting in the second stage further fills in the details.
  • the processing unit 802 can input the image to be processed and the corresponding first region mask to the first stage sub-network (may be called a coarse inpainting network) of the image processing network to output the coarse inpainting image, and then
  • the coarse inpainted image is input to the second-stage sub-network of the image processing network (which can be called a fine inpainting network) to output a fine inpainted image, which can be used as the first result image.
  • the processing unit 802 may use a codec network to implement an image processing network, for example, the image processing network shown in FIG. 5 may be used.
  • a loss function based on a least squares loss of a generative adversarial network is employed for training. The following formula can be used as the loss function:
  • L is the loss
  • D is the discriminator
  • G is the generator
  • x is the real image (i.e. the reference result)
  • z is the input of the generator (i.e. the masked image to be processed)
  • E is the expectation
  • p z , p x are the generator input and space of real images (ie, the entire training set), respectively
  • the obtaining unit 801 may obtain the second result image of the previous frame image of the current frame image of the video.
  • the fusion unit 803 may fuse the first result image of the current frame image and the second result image of the previous frame image to obtain the second result image of the current frame image as the final result image of the current frame image.
  • Simply using the single-image-based processing algorithm will produce jitter in the timing.
  • a fusion mechanism based on the current frame and the previous frame is adopted to eliminate jitter and improve the processing effect without increasing the overhead and calculation amount. .
  • the fusion unit 803 may perform fusion using an optical flow-based timing fusion mechanism.
  • the fusion unit 803 may perform the optical flow-based time series fusion mechanism through the following steps: perform optical flow calculation on the first result image of the current frame image and the second result image of the previous frame image, and calculate the optical flow based on the calculated optical flow Sampling is performed to obtain an adjacent frame alignment image; the first result image of the current frame image and each pixel of the first area pixel of the adjacent frame alignment image are fused.
  • the fusion unit 803 may, for each pixel of the first area pixel, calculate the statistical value of the pixel value of the first result image of the current frame image and the pixel value of the aligned image of the adjacent frame, as the pixel value of the pixel, to obtain fused image.
  • the second result image of the previous frame image utilized by the fusion mechanism may include at least one of the third result image and the fourth result image of the previous frame image.
  • the third result image of the previous frame image is obtained by using the image processing network based on the previous frame image and the first area mask;
  • the fourth result image of the previous frame image is obtained by comparing the previous frame image
  • the first result image of the image is obtained by fusing the fifth result image of a frame image before the previous frame image.
  • Calculate to obtain the second adjacent optical flow sample the first result image of the current frame image and the third result image of the previous frame image based on the first adjacent optical flow to obtain the first adjacent frame alignment image, and based on The second adjacent optical flow samples the first result image of the current frame image and the fourth result image of the previous frame image to obtain the second adjacent frame alignment image; Each pixel of the first area pixel of the first adjacent frame-aligned image and the second adjacent frame-aligned image is fused.
  • the video processing apparatus 800 may further include a determination unit (not shown).
  • the determining unit may determine whether the current frame image is the first frame image of the video to be processed or whether scene switching occurs between the current frame image and the previous frame image. If the current frame image is the first frame image of the video to be processed, there is no previous frame image, so the acquisition unit 801 does not need to perform the operation of acquiring the second result image of the previous frame image, and the fusion unit 803 does not need to perform any operation. If the scene switching occurs between the current frame image and the previous frame image, the screen will jump at these positions.
  • the acquisition unit 801 does not need to perform acquisition.
  • the fusion unit 803 also does not need to perform the operation. Therefore, in the case where the determining unit determines that the current frame image is the first frame image of the video to be processed or the scene switching occurs between the current frame image and the previous frame image, the acquiring unit 801 does not execute the acquisition of the second result of the previous frame image For image operations, the fusion unit 803 does not perform operations, and the processing unit 802 may use the first result image of the current frame image as the final result image of the current frame image.
  • the determination unit may determine whether a scene switch occurs in the current frame image compared with the previous frame image by automatically detecting a screen transition. For example, in the case of processing the current frame, the obtaining unit 801 can obtain the image of the previous frame, and the determining unit can calculate the difference between the image of the current frame and the image of the previous frame, and when the difference exceeds a predetermined threshold, it is determined that the occurrence of scene switching.
  • the difference may be based on the L2 norm distance of the predetermined image patch.
  • the L2 norm distance between each pixel of two adjacent frames can be calculated by the following formula:
  • I t (q) is the t-th frame image (for example, the current frame image)
  • It -1 (q) is the t-1-th frame image (for example, the previous frame image)
  • p may represent the current frame image
  • N(p) is the neighborhood range of p pixels, (e.g., a neighborhood range with a neighborhood radius of 5), i.e., a predetermined image block of p pixels
  • q is the traversal of pixels within N(p) range indicator.
  • N(p) is the neighborhood range of p pixels, (e.g., a neighborhood range with a neighborhood radius of 5), i.e., a predetermined image block of p pixels
  • q is the traversal of pixels within N(p) range indicator.
  • the present disclosure does not limit N(p).
  • the determining unit may calculate the average value of the L2 norm distance of each pixel, as the current frame image and the previous frame image. The difference value of the frame image. In a case where the calculated difference value is greater than a predetermined threshold value, the determination unit determines that a scene switch occurs in the current frame image compared with the previous frame.
  • the integral graph can also be used to accelerate the algorithm, so as to improve the speed of the algorithm.
  • the method for determining whether a scene switch occurs in the present disclosure is not limited to the above method, and any feasible method can also be used to determine whether a scene switch occurs.
  • the video processing apparatus 800 may further include a background fusion unit (not shown).
  • the background fusion unit may perform background fusion on the final result image of the current frame image, so that the first area of the current frame image The filling content can be more perfectly and naturally blended with the background of the current frame image, making the resulting image more harmonious and natural.
  • the background fusion unit may perform background fusion using a Poisson fusion algorithm. That is, based on the current frame image, the final result image of the current frame image and the first region mask, the background fusion unit uses the Poisson fusion algorithm to obtain the sixth result image of the current frame image as the final result image of the current frame image.
  • the background fusion unit may use the first area in the first area mask as a reference area, and calculate the pixel value of the pixel of the current frame image and the pixel value of the pixel of the final result image of the current frame image at the boundary of the reference area.
  • the pixel value of the pixel at the boundary of the reference area in the final result image of the current frame image can be adjusted until the gradient is minimized; the adjusted final result image of the current frame image when the gradient is minimized as the sixth result image of the current frame image.
  • FIG. 9 is a block diagram of an electronic device 900 according to an exemplary embodiment of the present disclosure.
  • the electronic device 900 may be a PC computer, a tablet device, a personal digital assistant, a smart phone, or any other device capable of executing the above set of instructions.
  • the electronic device 900 is not necessarily a single electronic device, but can also be a collection of any device or circuit capable of individually or jointly executing the above-mentioned instructions (or instruction sets).
  • Electronic device 900 may also be part of an integrated control system or system manager, or may be configured as a portable electronic device that interfaces locally or remotely (eg, via wireless transmission).
  • processor 902 may include a central processing unit (CPU), graphics processing unit (GPU), programmable logic device, special purpose processor system, microcontroller, or microprocessor.
  • processors may also include analog processors, digital processors, microprocessors, multi-core processors, processor arrays, network processors, and the like.
  • Processor 902 may execute instructions or code stored in memory 901, which may also store data. Instructions and data may also be sent and received over a network via a network interface device, which may employ any known transport protocol.
  • the memory 901 may be integrated with the processor 902, eg, RAM or flash memory arranged within an integrated circuit microprocessor or the like. Furthermore, memory 901 may comprise a separate device, such as an external disk drive, a storage array, or any other storage device that may be used by a database system. The memory 901 and the processor 902 may be operatively coupled, or may communicate with each other, eg, through I/O ports, network connections, etc., to enable the processor 902 to read files stored in the memory.
  • the electronic device 900 may also include a video display (such as a liquid crystal display) and a user interaction interface (such as a keyboard, mouse, touch input device, etc.). All components of electronic device 900 may be connected to each other via a bus and/or network.
  • a video display such as a liquid crystal display
  • a user interaction interface such as a keyboard, mouse, touch input device, etc.
  • a computer-readable storage medium storing instructions, wherein the instructions, when executed by at least one processor, cause the at least one processor to perform the video processing method according to the present disclosure.
  • Examples of the computer-readable storage medium herein include: Read Only Memory (ROM), Random Access Programmable Read Only Memory (PROM), Electrically Erasable Programmable Read Only Memory (EEPROM), Random Access Memory (RAM) , dynamic random access memory (DRAM), static random access memory (SRAM), flash memory, non-volatile memory, CD-ROM, CD-R, CD+R, CD-RW, CD+RW, DVD-ROM , DVD-R, DVD+R, DVD-RW, DVD+RW, DVD-RAM, BD-ROM, BD-R, BD-R LTH, BD-RE, Blu-ray or Optical Disc Storage, Hard Disk Drive (HDD), Solid State Hard disk (SSD), card memory (such as a multimedia card, Secure Digital (SD) card, or Extreme Digital
  • the computer program in the above-mentioned computer readable storage medium can be executed in an environment deployed in a computer device such as a client, a host, a proxy device, a server, etc.
  • the computer program and any associated data, data files and data structures are distributed over networked computer systems so that the computer programs and any associated data, data files and data structures are stored, accessed and executed in a distributed fashion by one or more processors or computers.
  • a computer program product in which instructions are executable by a processor of a computer device to implement the video processing method according to the exemplary embodiment of the present disclosure.
  • single image processing ie, first region filling
  • adjacent frame fusion processing is performed by considering adjacent frame information by using a specific fusion mechanism, which can automatically remove the content in the video.
  • Contents such as occlusion, advertisements, etc., do not need to use multiple pre- and post-frame information and multiple optical flow calculations, while ensuring low algorithm overhead and fast speed (for example, 15 frames/second processing speed), improve the filling content of the first area.
  • the quality of the filled content and the original video content is harmonious and natural.
  • the filled video can make the trace area no longer obvious, and it is indistinguishable from the original video, so as to achieve the effect of being fake and real, thereby improving the user's viewing experience.
  • the video processing method and the video processing device of the present disclosure it is possible to select an appropriate first area for trace patterns in the video in real time, and make full use of surrounding information to improve the content filling quality of the first area without increasing overhead and interference. , and there is no need to mark the mask in advance, there are no restrictions on the location of the trace, the shape of the trace, and the type of video, which can stably produce excellent processing results.
  • background fusion is performed on the processed image by using the Poisson fusion algorithm, so that the filling content of the first region can be more perfectly and naturally fused with the image background, making the resulting image more harmonious and natural.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Probability & Statistics with Applications (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)
  • Studio Devices (AREA)

Abstract

本公开关于一种视频处理方法和视频处理装置。所述视频处理方法包括:获取视频的当前帧图像和第一区域掩膜,其中所述第一区域与所述当前帧图像中期望去除的区域对应;基于所述当前帧图像和所述第一区域掩膜,利用图像处理网络,获得所述当前帧图像的第一结果图像,其中所述第一结果图像为在所述当前帧图像中去除了所述第一区域的图像;获取所述视频的所述当前帧图像的前一帧图像的第二结果图像,其中所述第二结果图像为在所述前一帧图像中去除了所述第一区域的图像;对所述当前帧图像的第一结果图像和所述前一帧图像的第二结果图像进行融合,获得所述当前帧图像的最终结果图像。

Description

视频处理方法和视频处理装置
相关申请的交叉引用
本申请基于申请号为202011104678.6、申请日为2020年10年15日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本公开涉及音视频技术领域,更具体地说,涉及一种视频处理方法和视频处理装置。
背景技术
在视频的后期处理中,经常需要手动去除在拍摄过程中来自人或物的意外遮挡。
发明内容
本公开提供一种视频处理方法和视频处理装置。
根据本公开实施例的第一方面,提供一种视频处理方法,包括:获取视频的当前帧图像和第一区域掩膜,其中所述第一区域与所述当前帧图像中期望去除的区域对应;基于所述当前帧图像和所述第一区域掩膜,利用图像处理网络,获得所述当前帧图像的第一结果图像,其中所述第一结果图像为在所述当前帧图像中去除了所述第一区域的图像;获取所述视频的所述当前帧图像的前一帧图像的第二结果图像,其中所述第二结果图像为在所述前一帧图像中去除了所述第一区域的图像;对所述当前帧图像的第一结果图像和所述前一帧图像的第二结果图像进行融合,获得所述当前帧图像的最终结果图像。
根据本公开实施例的第二方面,提供一种视频处理装置,包括:获取单元,被配置为获取视频的当前帧图像和第一区域掩膜,以及获取所述视频的所述当前帧图像的前一帧图像的第二结果图像,其中所述第一区域与所述当前帧图像中期望去除的区域对应,所述第二结果图像为在所述前一帧图像中去除了所述第一区域的图像;处理单元,被配置为基于所述当前帧图像和所述第一区域掩膜,利用图像处理网络,获得所述当前帧图像的第一结果图像,其中所述第一结果图像为在所述当前帧图像中去除了所述第一区域的图像;融合单元,被配置为对所述当前帧图像的第一结果图像和所述前一帧图像的第二结果图像进行融合,获得所述当前帧图像的最终结果图像。
根据本公开实施例的第三方面,提供一种电子设备,包括:至少一个处理器;至少一个存储计算机可执行指令的存储器,其中,所述计算机可执行指令在被所述至少一个处理器运行时,促使所述至少一个处理器执行根据本公开的视频处理方法。
根据本公开实施例的第四方面,提供一种存储指令的计算机可读存储介质,其中,当所述指令被至少一个处理器运行时,促使所述至少一个处理器执行根据本公开的视频处理方法。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理,并不构成对本公开的不当限定。
图1是示出根据本公开的示例性实施例的视频处理方法和视频处理装置的实施场景示意图。
图2是示出根据本公开的示例性实施例的视频处理方法的流程图。
图3是示出根据本公开的示例性实施例的第一区域的示意图。
图4是示出根据本公开的示例性实施例的图像处理过程的示意图。
图5是示出根据本公开的示例性实施例的图像处理网络的示意图。
图6是示出根据本公开的示例性实施例的融合机制的示意图。
图7是示出根据本公开的示例性实施例的视频处理方法的流程示意图。
图8是示出根据本公开的示例性实施例的视频处理装置的框图。
图9是根据本公开的示例性实施例的电子设备900的框图。
具体实施方式
为了使本领域普通人员更好地理解本公开的技术方案,下面将结合附图,对本公开实施例中的技术方案进行清楚、完整地描述。
需要说明的是,本公开的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本公开的实施例能够以除了在这里图示或描述的那些以外的顺序实施。以下实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。
在此需要说明的是,在本公开中出现的“若干项之中的至少一项”均表示包含“该若干项中的任意一项”、“该若干项中的任意多项的组合”、“该若干项的全体”这三类并列的情况。例如“包括A和B之中的至少一个”即包括如下三种并列的情况:(1)包括A;(2)包括B;(3)包括A和B。又例如“执行步骤一和步骤二之中的至少一个”,即表示如下三种并列的情况:(1)执行步骤一;(2)执行步骤二;(3)执行步骤一和步骤二。
传统的视频处理方法可通过统计第一区域周围背景像素值,设计算法对第一区域内部进行插值,将插值结果作为填补内容,修补第一区域。从处理效率上来看,此类算法大多数是基于中央处理器CPU的算法,虽然算法较为简单但是无法充分利用高并行化处理器如图像处理器GPU,速度受到了一定程度的限制。从处理效果上来看,由于算法只是基于统计规律的简单插值,视觉上还是能够明显看到遮挡,只是遮挡物的轮廓和内容被抹去,给人一种类似“马赛克”的效果,视觉效果不佳。
基于深度学习的视频处理方法可采用深度卷积神经网络进行视频处理,通过设计精巧、复杂的网络结构,利用目标帧前后多帧图像作为参考,对待处理图像进行处理。例如,相关 方法一设计了精巧而复杂的网络结构,采用目标帧及固定间隔采样的前后4帧作为输入帧,同时将上一帧的修补结果作为参考帧,6幅图像同时进入网络计算,对于不同帧之间设计了光流预测模块,用以来对齐不同帧的特征,对齐后的特征经过简单融合用于预测最后的结果。又例如,相关方法二先计算出目标帧前后多个相邻帧的光流作为输入,利用光流补全网络填补目标帧空缺的光流,利用预测得到的完整光流进行前向、反向传播,得到最终修补的图像,对于视频中未出现过的内容,利用单图修复网络进行修复。此类方法内部涉及多帧图像的处理和多次光流的计算,开销过大,时间成本较高,处理速度较慢,不适用于线上应用场景。此外,此类方法还需要提供标注好的掩膜,而不能自动化识别。
为了在保证算法开销小、速度快的同时提高视频处理效果,本公开提出了一种视频处理方法和视频处理装置。具体地说,为了充分提升填补内容的质量,采用了基于深度卷积神经网络的补全算法,对基于指定痕迹预先算好的第一区域进行填充,使得周边背景的语义信息得到充分的利用;此外,考虑到单图的填充算法不可避免的会在视频中出现严重的闪烁现象,设计了一种特殊的融合机制,能够自适应的根据当前帧填充结果、上一帧填充结果和上一帧最终融合结果进行选择,从而在不过多增加开销的情况下,仅利用前一帧图像进行融合,就可达到消除视频闪烁的现象;此外,为了使填充的内容与周边背景完美自然地融合,利用柏松融合算法对处理结果进行处理,使得处理效果进一步提升。下面,将参照图1至图9具体描述根据本公开的示例性实施例的视频处理方法和视频处理装置。
图1是示出根据本公开的示例性实施例的视频处理方法和视频处理装置的实施场景示意图。
如图1所示,当视频平台接收到视频源时,可对视频进行后处理,再将经过后处理的视频内容下发到各用户终端。视频的后处理可包括对在相机(这里,相机是具有拍摄功能的设备的统称)拍摄过程中来自人或物的意外遮挡进行去除以及其他不期望出现在视频中的图像进行去除等等。
图2是示出根据本公开的示例性实施例的视频处理方法的流程图。本公开实施例的视频处理方法可以具有视频处理功能的电子设备执行。
参照图2,在步骤201,可获取视频的当前帧图像和第一区域掩膜,其中所述第一区域与所述当前帧图像中期望去除的区域对应。这里,视频是指待处理视频,例如,可以是视频平台获取到的由摄像机拍摄的视频、或者来自其他视频平台的视频、或者来自网络或本地存储的视频等等。根据本公开的示例性实施例的视频处理方法可对待处理视频的每一帧图像执行处理处理,因此,当前帧是指当前被执行处理处理的帧。
此外,第一区域掩膜是指待处理视频的图像中遮挡除预先确定的将要执行处理处理的区域之外的区域的图像掩膜。将要执行处理处理的区域(下面,可简称为第一区域)可以是比待去除图像更大的区域,这是因为利用待去除图像周边背景的语义信息,更有利于提升填补内容的质量。针对待处理图案,应该选择适当的第一区域作为上下文的参考区域,如果第一区域过大会引入过多无关信息,让处理模型产生困扰,而如果第一区域过小则无法包含有效的参考信息,影响处理效果。根据本公开的示例性实施例,第一区域可以是包括待处理图案 的预定区域,该预定区域是待处理视频的图像的局部区域。例如,第一区域可以是待处理视频的图像中的特定矩形区域,该特定矩形区域以待处理视频的图像的待处理图案的中心为中心点且以待处理图案最长边的两倍为边长。图3是示出根据本公开的示例性实施例的第一区域的示意图。如图3所示,假设待去除图像(ABCD)的最长边为1,则第一区域可以是以待处理图案的中心点a为中心点,边长为2的矩形区域。当然,根据本公开的第一区域不限于上述,还可以是任何可能的第一区域。
返回图2,在步骤202,可基于当前帧图像和第一区域掩膜,利用图像处理网络,获得当前帧图像的第一结果图像,其中所述第一结果图像为在所述当前帧图像中去除了所述第一区域的图像。这里,图像处理网络可以是任何基于单图图像修补的神经网络(例如,深度卷积神经网络等)。此外,针对特定的场景,图像处理网络还可以是针对性训练过的网络模型。
根据本公开的示例性实施例,可采用由粗到细的深度卷积神经网络,第一阶段的粗修补完成大致轮廓的填补,第二阶段的细修补进一步填充细节。图4是示出根据本公开的示例性实施例的图像处理过程的示意图。如图4所示,可将待处理图像和相应的第一区域掩膜输入到图像处理网络的第一阶段子网络(可称为粗修补网络),以输出粗修补图像,再将粗修补图像输入到图像处理网络的第二阶段子网络(可称为精修补网络),以输出精修补图像,可作为第一结果图像。
根据本公开的示例性实施例,可采用编解码器网络来实现图像处理网络。图5是示出根据本公开的示例性实施例的图像处理网络的示意图。如图5所示,根据本公开的示例性实施例的图像处理网络是对现有图像补全网络进行改进的网络。根据本公开的示例性实施例的图像处理网络包括两个阶段,第一阶段包括用于图像粗修补的编解码器网络结构,其输入为待处理图像和相应的第一区域掩膜,其中,第一阶段网络结构采用门卷积和空洞门卷积结合的方式来获得粗修补结果图像;第二阶段包括用于图像细修补的包括两个分支的编解码器网络结构,其输入为第一阶段输出的粗修补结果图像,其中,第二阶段网络结构中的一个分支采用纯门卷积,另一分支采用门卷积和空洞门卷积结合的方式,两个分支输出结果拼接,再进一步执行门卷积以获得精修补结果图像。
根据本公开的示例性实施例,在第二阶段网络结构中去除了上下文感知模块以进行模型改进。上下文感知模块是对全局信息的利用,参考图像中其他已知区域以进行仿制,然而,首先,全局信息的计算是额外的开销,会对算法速度产生影响;其次,处理算法出于速度性能考虑,输入的是裁剪后的图片,而非原图,可以借鉴的上下文信息并不多;其次,通过对一些案例的观察,强制去参考全文信息反而会生成一些错误的纹理。因此,在将现有图像补全网络应用于视频图像处理领域的情况下,可在其第二阶段网络结构中去除了上下文感知模块来提高图像处理的效率和效果。
此外,根据本公开的示例性实施例,在对根据本公开的示例性实施例的图像处理网络执行训练的过程中,采用基于生成对抗网络的最小二乘损失的损失函数来进行训练。可采用以下公式作为损失函数:
Figure PCTCN2021106339-appb-000001
Figure PCTCN2021106339-appb-000002
其中,L表示损失,D表示判别器,G表示生成器,x表示真实图像(即,参考结果),z表示生成器的输入(即,经过掩膜处理的图像),E表示期望,p z、p x分别是生成器输入和真实图像的空间(即,整个训练集),a、b、c是三个可调参数,其中,可将b和c设置为b=c。因为最小化的是输出结果与a、b、c之间的平方误差,因此叫做二乘损失。
返回参照图2,在步骤203,可获取视频的当前帧图像的前一帧图像的第二结果图像,其中所述第二结果图像为在所述前一帧图像中去除了所述第一区域的图像。在步骤204,可对当前帧图像的第一结果图像和前一帧图像的第二结果图像进行融合,获得当前帧图像的最终结果图像。单纯使用基于单图的处理算法在时序上会产生抖动,为了避免抖动,采用了基于当前帧和前一帧的融合机制,在不过多增加开销和运算量的情况下,消除抖动,提高处理效果。
根据本公开的示例性实施例,可采用基于光流的时序融合机制执行融合。由于第一区域的影响,基于相邻两帧的图像计算得到的光流会出现较大偏差,因此使用已利用图像处理网络进行处理和填补的结果图像光流计算,能够得到较为准确的结果。因此,在执行融合的情况下,基于相邻两帧图像的结果图像进行光流计算。例如,可采用当流预测网络PWC-Net来作为光流提取网络,或者可任意的光流算法,在速度和精度上实现调节。随后,可利用计算得到的光流对相邻两帧图像进行采样,获得对齐后的图像。例如,可通过pytorch自带的采样算法(grid_sample),通光流指示像素从上一帧传播到下一帧的对应位置。随后,可对当前帧的结果图像和对齐后的图像的第一区域像素的每个像素进行融合,以得到包括像素被融合的第一区域的图像。这里,融合机制可以是对将被融合的图像的第一区域中的每个相同的像素点在多个像素值之间进行投票或计算,以获得相应像素点的像素值。例如,计算当前帧的结果图像的第一区域中的每个像素的像素值和对齐后的图像的第一区域的相应像素的像素的统计值(例如,平均值、中位数、众数等),作为该像素的像素值。
因此,根据本公开的示例性实施例,在步骤204,可通过以下步骤来执行基于光流的时序融合机制:对当前帧图像的第一结果图像和前一帧图像的第二结果图像进行光流计算,并基于计算出的光流进行采样,获得相邻帧对齐图像;对当前帧图像的第一结果图像和相邻帧对齐图像的第一区域像素的每个像素进行融合。例如,可针对第一区域像素的每个像素,计算当前帧图像的第一结果图像的像素值和相邻帧对齐图像的像素值的统计值,作为该像素的像素值,以获得融合后的图像。
根据本公开的示例性实施例,融合机制利用的前一帧图像的第二结果图像可包括前一帧图像的第三结果图像和第四结果图像中的至少一个。这里,前一帧图像的第三结果图像是通过基于前一帧图像和第一区域掩膜,利用所述图像处理网络而获得的;前一帧图像的第四结果图像是通过对前一帧图像的第一结果图像和前一帧图像之前的一帧图像的第五结果图像进行融合而获得的。
根据本公开的示例性实施例,在前一帧图像的第二结果图像可包括前一帧图像的第三结果图像和第四结果图像两者的情况下,在步骤204,对当前帧图像的第一结果图像和前一帧图像的第三结果图像进行光流计算,获得第一相邻光流,并对当前帧图像的第一结果图像和前一帧图像的第四结果图像进行光流计算,获得第二相邻光流;基于第一相邻光流对当前帧图像的第一结果图像和前一帧图像的第三结果图像进行采样,获得第一相邻帧对齐图像,并基于第二相邻光流对当前帧图像的第一结果图像和所述前一帧图像的第四结果图像进行采样,获得第二相邻帧对齐图像;对当前帧图像的第一结果图像、第一相邻帧对齐图像和第二相邻帧对齐图像的第一区域像素的每个像素进行融合。
图6是示出根据本公开的示例性实施例的融合机制的示意图。参照图6,可利用当前帧(t帧)的第一结果图像(t帧生成)、前一帧(t-1帧)的第三结果图像(t-1帧生成)、前一帧的第四结果图像(t-1帧结果)进行融合,来产生当前帧的最终结果图像(t帧结果)。具体地说,可将当前帧的第一结果图像(t帧生成)与前一帧的第三结果图像(t-1帧生成)进行光流计算并采样,获得第一相邻帧对齐图像(t-1帧生成传播),并可将当前帧的第一结果图像(t帧生成)与前一帧的第四结果图像(t-1帧结果)进行光流计算并采样,获得第二相邻帧对齐图像(t-1帧结果传播)。随后,对当前帧图像的第一结果图像(t帧生成)、第一相邻帧对齐图像(t-1帧生成传播)和第二相邻帧对齐图像(t-1帧结果传播)的第一区域像素的每个像素进行融合。例如,可针对第一区域像素的每个像素,计算当前帧图像的第一结果图像的像素值、第一相邻帧对齐图像的像素值和第二相邻帧对齐图像的像素值的中位数,作为该像素的像素值,从而可获得融合后的图像,即,当前帧图像的最终结果图像。
返回参照图2,根据本公开的示例性实施例,在执行步骤203和204之前,还可确定当前帧图像是否是待处理视频的第一帧图像或者当前帧图像与前一帧图像相比是否发生场景切换。如果当前帧图像是待处理视频的第一帧图像,则不存在前一帧图像,因此无需执行步骤203和步骤204。如果当前帧图像与前一帧图像相比发生场景切换,画面会在这些位置发生跳变,利用前一帧信息帮助填补第一区域只会对处理结果造成负面作用,因此也无需执行步骤203和步骤204。因此,在确定当前帧图像是待处理视频的第一帧图像或者当前帧图像与前一帧图像相比发生场景切换的情况下,不执行步骤203和204,并可将在步骤202获得的当前帧图像的第一结果图像,作为当前帧图像的最终结果图像。
根据本公开的示例性实施例,可通过自动检测画面跳变来确定当前帧图像与前一帧图像相比是否发生场景切换。例如,在处理当前帧的情况下,可获得前一帧图像,并计算当前帧图像与前一帧图像的差异,在这个差异超过了预定阈值的情况下,则确定发生了场景切换。
例如,该差异可以是基于预定图像块的L2范数距离。例如,可通过下面的公式计算相邻两帧的每个像素之间的L2范数距离:
Figure PCTCN2021106339-appb-000003
其中,I t(q)为第t帧图像(例如,当前帧图像),I t-1(q)为第t-1帧图像(例如,前一帧 图像),p可表示当前帧图像的每个像素,N(p)为p像素的邻域范围,(例如,邻域半径为5的邻域范围),即,p像素的预定图像块,q为遍历N(p)范围内的像素的指示符。本公开对N(p)不作限制。
在通过上述公式获得当前帧图像和前一帧图像的每个像素的L2范数距离值的情况下,可计算每个像素的L2范数距离的平均值,作为当前帧图像与前一帧图像的差异值。在计算出的差异值大于预定阈值的情况下,确定当前帧图像与前一帧相比发生场景切换。
此外,在实际计算相邻帧图像的每个像素之间的距离的过程中,还可采用积分图进行算法加速,以提高算法速度。
当然,本公开的确定是否发生场景切换的方法不限于上述方法,还可利用任何可行的方法来确定是否发生场景切换。
根据本公开的示例性实施例,由于光照条件、相机对焦可能存在突变,或者由于相机和被摄主体的运动可能会产生模糊,对齐后相邻两帧的图像可能存在较大的偏差。因此,在根据本公开的视频处理方法的步骤202产生当前帧图像的最终结果图像或者步骤204产生当前帧图像的最终结果图像之后,还可对当前帧图像的最终结果图像进行背景融合,使得当前帧图像的第一区域的填补内容能够更完美更自然地与当前帧图像的背景融合,使得结果图像更和谐和自然。
例如,可采用柏松融合算法执行背景融合。即,基于当前帧图像、当前帧图像的最终结果图像和第一区域掩膜,利用柏松融合算法,获得当前帧图像的第六结果图像,作为当前帧图像的最终结果图像。具体地说,可以以第一区域掩膜中的第一区域为参考区域,计算在参考区域边界处当前帧图像的像素的像素值与当前帧图像的最终结果图像的像素的像素值之间的梯度;可调整当前帧图像的最终结果图像在所述参考区域边界处的像素的像素值,直到所述梯度最小化;将梯度最小化时的调整后的当前帧图像的最终结果图像作为当前帧图像的第六结果图像。
图7是示出根据本公开的示例性实施例的视频处理方法的流程示意图。
参照图7,首先,可将待处理视频的图像帧以及相应的第一区域掩膜输入到基于单帧图像的图像处理网络,以获得基于单帧填补的结果图像(例如,上述的第一结果图像),随后,可对基于单帧填补的结果图像执行前后相邻帧的融合算法,获得基于融合填补的结果图像(例如,上述的第二结果图像),随后,可对基于融合填补的结果图像执行背景融合,获得基于背景融合的结果图像(例如,上述的第六结果图像),作为最终的结果图像以输出。
图8是示出根据本公开的示例性实施例的视频处理装置的框图。
参照图8,根据本公开的示例性实施例的视频处理装置800可包括获取单元801、处理单元802和融合单元803。
获取单元801可获取视频的当前帧图像和第一区域掩膜。这里,视频是指待处理视频,例如,可以是视频平台获取到的由摄像机拍摄的视频、或者来自其他视频平台的视频、或者来自网络或本地存储的视频等等。根据本公开的示例性实施例的视频处理方法可对待处理视频的每一帧图像执行处理处理,因此,当前帧是指当前被执行处理处理的帧。
此外,第一区域掩膜是指待处理视频的图像中遮挡除预先确定的将要执行处理处理的区域之外的区域的图像掩膜。将要执行处理处理的区域(下面,可简称为第一区域)可以是比待去除图像更大的区域,这是因为利用待去除图像周边背景的语义信息,更有利于提升填补内容的质量。针对待处理图案,应该选择适当的第一区域作为上下文的参考区域,如果第一区域过大会引入过多无关信息,让处理模型产生困扰,而如果第一区域过小则无法包含有效的参考信息,影响处理效果。根据本公开的示例性实施例,第一区域可以是包括待处理图案的预定区域,该预定区域是待处理视频的图像的局部区域。例如,第一区域可以是待处理视频的图像中的特定矩形区域,该特定矩形区域以待处理视频的图像的待处理图案的中心为中心点且以待处理图案最长边的两倍为边长。当然,根据本公开的第一区域不限于上述,还可以是任何可能的第一区域。
随后,处理单元802可基于当前帧图像和第一区域掩膜,利用图像处理网络,获得当前帧图像的第一结果图像。这里,图像处理网络可以是任何基于单图图像修补的神经网络(例如,深度卷积神经网络等)。此外,针对特定的场景,图像处理网络还可以是针对性训练过的网络模型。
根据本公开的示例性实施例,处理单元802可采用由粗到细的深度卷积神经网络,第一阶段的粗修补完成大致轮廓的填补,第二阶段的细修补进一步填充细节。如图4所示,处理单元802可将待处理图像和相应的第一区域掩膜输入到图像处理网络的第一阶段子网络(可称为粗修补网络),以输出粗修补图像,再将粗修补图像输入到图像处理网络的第二阶段子网络(可称为精修补网络),以输出精修补图像,可作为第一结果图像。
根据本公开的示例性实施例,处理单元802可采用编解码器网络来实现图像处理网络,例如,可采用如图5所示的图像处理网络。此外,根据本公开的示例性实施例,在对根据本公开的示例性实施例的图像处理网络执行训练的过程中,采用基于生成对抗网络的最小二乘损失的损失函数来进行训练。可采用以下公式作为损失函数:
Figure PCTCN2021106339-appb-000004
Figure PCTCN2021106339-appb-000005
其中,L表示损失,D表示判别器,G表示生成器,x表示真实图像(即,参考结果),z表示生成器的输入(即,经过掩膜处理的待处理图像),E表示期望,p z、p x分别是生成器输入和真实图像的空间(即,整个训练集),a、b、c是三个可调参数,其中,可将b和c设置为b=c。因为最小化的是输出结果与a、b、c之间的平方误差,因此叫做二乘损失。
随后,获取单元801可获取视频的当前帧图像的前一帧图像的第二结果图像。融合单元803可对当前帧图像的第一结果图像和前一帧图像的第二结果图像进行融合,获得当前帧图像的第二结果图像,作为当前帧图像的最终结果图像。单纯使用基于单图的处理算法在时序上会产生抖动,为了避免抖动,采用了基于当前帧和前一帧的融合机制,在不过多增加开销和运算量的情况下,消除抖动,提高处理效果。
根据本公开的示例性实施例,融合单元803可采用基于光流的时序融合机制执行融合。 例如,融合单元803可通过以下步骤来执行基于光流的时序融合机制:对当前帧图像的第一结果图像和前一帧图像的第二结果图像进行光流计算,并基于计算出的光流进行采样,获得相邻帧对齐图像;对当前帧图像的第一结果图像和相邻帧对齐图像的第一区域像素的每个像素进行融合。例如,融合单元803可针对第一区域像素的每个像素,计算当前帧图像的第一结果图像的像素值和相邻帧对齐图像的像素值的统计值,作为该像素的像素值,以获得融合后的图像。
根据本公开的示例性实施例,融合机制利用的前一帧图像的第二结果图像可包括前一帧图像的第三结果图像和第四结果图像中的至少一个。这里,前一帧图像的第三结果图像是通过基于前一帧图像和第一区域掩膜,利用所述图像处理网络而获得的;前一帧图像的第四结果图像是通过对前一帧图像的第一结果图像和前一帧图像之前的一帧图像的第五结果图像进行融合而获得的。
根据本公开的示例性实施例,在前一帧图像的第二结果图像可包括前一帧图像的第三结果图像和第四结果图像两者的情况下,融合单元803可对当前帧图像的第一结果图像和前一帧图像的第三结果图像进行光流计算,获得第一相邻光流,并对当前帧图像的第一结果图像和前一帧图像的第四结果图像进行光流计算,获得第二相邻光流;基于第一相邻光流对当前帧图像的第一结果图像和前一帧图像的第三结果图像进行采样,获得第一相邻帧对齐图像,并基于第二相邻光流对当前帧图像的第一结果图像和所述前一帧图像的第四结果图像进行采样,获得第二相邻帧对齐图像;对当前帧图像的第一结果图像、第一相邻帧对齐图像和第二相邻帧对齐图像的第一区域像素的每个像素进行融合。例如,融合单元803可针对第一区域像素的每个像素,计算当前帧图像的第一结果图像的像素值、第一相邻帧对齐图像的像素值和第二相邻帧对齐图像的像素值的中位数,作为该像素的像素值,从而可获得融合后的图像,即,当前帧图像的最终结果图像。
根据本公开的示例性实施例,根据本公开的示例性实施例的视频处理装置800还可包括确定单元(未示出)。确定单元可确定当前帧图像是否是待处理视频的第一帧图像或者当前帧图像与前一帧图像相比是否发生场景切换。如果当前帧图像是待处理视频的第一帧图像,则不存在前一帧图像,因此获取单元801无需执行获取前一帧图像的第二结果图像的操作,融合单元803也无需执行操作。如果当前帧图像与前一帧图像相比发生场景切换,画面会在这些位置发生跳变,利用前一帧信息帮助填补第一区域只会对处理结果造成负面作用,因此获取单元801无需执行获取前一帧图像的第二结果图像的操作,融合单元803也无需执行操作。因此,在确定单元确定当前帧图像是待处理视频的第一帧图像或者当前帧图像与前一帧图像相比发生场景切换的情况下,获取单元801不执行获取前一帧图像的第二结果图像的操作,融合单元803也不执行操作,并处理单元802可将当前帧图像的第一结果图像,作为当前帧图像的最终结果图像。
根据本公开的示例性实施例,确定单元可通过自动检测画面跳变来确定当前帧图像与前一帧图像相比是否发生场景切换。例如,在处理当前帧的情况下,获取单元801可获得前一帧图像,并确定单元可计算当前帧图像与前一帧图像的差异,在这个差异超过了预定阈值的 情况下,则确定发生了场景切换。
例如,该差异可以是基于预定图像块的L2范数距离。例如,可通过下面的公式计算相邻两帧的每个像素之间的L2范数距离:
Figure PCTCN2021106339-appb-000006
其中,I t(q)为第t帧图像(例如,当前帧图像),I t-1(q)为第t-1帧图像(例如,前一帧图像),p可表示当前帧图像的每个像素,N(p)为p像素的邻域范围,(例如,邻域半径为5的邻域范围),即,p像素的预定图像块,q为遍历N(p)范围内的像素的指示符。本公开对N(p)不作限制。
在通过上述公式获得当前帧图像和前一帧图像的每个像素的L2范数距离值的情况下,确定单元可计算每个像素的L2范数距离的平均值,作为当前帧图像与前一帧图像的差异值。在计算出的差异值大于预定阈值的情况下,确定单元确定当前帧图像与前一帧相比发生场景切换。
此外,在实际计算相邻帧图像的每个像素之间的距离的过程中,还可采用积分图进行算法加速,以提高算法速度。
当然,本公开的确定是否发生场景切换的方法不限于上述方法,还可利用任何可行的方法来确定是否发生场景切换。
根据本公开的示例性实施例,由于光照条件、相机对焦可能存在突变,或者由于相机和被摄主体的运动可能会产生模糊,对齐后相邻两帧的图像可能存在较大的偏差。因此,根据本公开的示例性实施例的视频处理装置800还可包括背景融合单元(未示出)。在处理单元802产生当前帧图像的最终结果图像或者融合单元803产生当前帧图像的最终结果图像之后,背景融合单元可对当前帧图像的最终结果图像进行背景融合,使得当前帧图像的第一区域的填补内容能够更完美更自然地与当前帧图像的背景融合,使得结果图像更和谐和自然。
例如,背景融合单元可采用柏松融合算法执行背景融合。即,背景融合单元基于当前帧图像、当前帧图像的最终结果图像和第一区域掩膜,利用柏松融合算法,获得当前帧图像的第六结果图像,作为当前帧图像的最终结果图像。具体地说,背景融合单元可以以第一区域掩膜中的第一区域为参考区域,计算在参考区域边界处当前帧图像的像素的像素值与当前帧图像的最终结果图像的像素的像素值之间的梯度;可调整当前帧图像的最终结果图像在所述参考区域边界处的像素的像素值,直到所述梯度最小化;将梯度最小化时的调整后的当前帧图像的最终结果图像作为当前帧图像的第六结果图像。
图9是根据本公开的示例性实施例的电子设备900的框图。
参照图9,电子设备900包括至少一个存储器901和至少一个处理器902,所述至少一个存储器901中存储有计算机可执行指令集合,当计算机可执行指令集合被至少一个处理器902执行时,执行根据本公开的示例性实施例的视频处理方法。
作为示例,电子设备900可以是PC计算机、平板装置、个人数字助理、智能手机、或 其他能够执行上述指令集合的装置。这里,电子设备900并非必须是单个的电子设备,还可以是任何能够单独或联合执行上述指令(或指令集)的装置或电路的集合体。电子设备900还可以是集成控制***或***管理器的一部分,或者可被配置为与本地或远程(例如,经由无线传输)以接口互联的便携式电子设备。
在电子设备900中,处理器902可包括中央处理器(CPU)、图形处理器(GPU)、可编程逻辑装置、专用处理器***、微控制器或微处理器。作为示例而非限制,处理器还可包括模拟处理器、数字处理器、微处理器、多核处理器、处理器阵列、网络处理器等。
处理器902可运行存储在存储器901中的指令或代码,其中,存储器901还可以存储数据。指令和数据还可经由网络接口装置而通过网络被发送和接收,其中,网络接口装置可采用任何已知的传输协议。
存储器901可与处理器902集成为一体,例如,将RAM或闪存布置在集成电路微处理器等之内。此外,存储器901可包括独立的装置,诸如,外部盘驱动、存储阵列或任何数据库***可使用的其他存储装置。存储器901和处理器902可在操作上进行耦合,或者可例如通过I/O端口、网络连接等互相通信,使得处理器902能够读取存储在存储器中的文件。
此外,电子设备900还可包括视频显示器(诸如,液晶显示器)和用户交互接口(诸如,键盘、鼠标、触摸输入装置等)。电子设备900的所有组件可经由总线和/或网络而彼此连接。
根据本公开的示例性实施例,还可提供一种存储指令的计算机可读存储介质,其中,当指令被至少一个处理器运行时,促使至少一个处理器执行根据本公开的视频处理方法。这里的计算机可读存储介质的示例包括:只读存储器(ROM)、随机存取可编程只读存储器(PROM)、电可擦除可编程只读存储器(EEPROM)、随机存取存储器(RAM)、动态随机存取存储器(DRAM)、静态随机存取存储器(SRAM)、闪存、非易失性存储器、CD-ROM、CD-R、CD+R、CD-RW、CD+RW、DVD-ROM、DVD-R、DVD+R、DVD-RW、DVD+RW、DVD-RAM、BD-ROM、BD-R、BD-R LTH、BD-RE、蓝光或光盘存储器、硬盘驱动器(HDD)、固态硬盘(SSD)、卡式存储器(诸如,多媒体卡、安全数字(SD)卡或极速数字(XD)卡)、磁带、软盘、磁光数据存储装置、光学数据存储装置、硬盘、固态盘以及任何其他装置,所述任何其他装置被配置为以非暂时性方式存储计算机程序以及任何相关联的数据、数据文件和数据结构并将所述计算机程序以及任何相关联的数据、数据文件和数据结构提供给处理器或计算机使得处理器或计算机能执行所述计算机程序。上述计算机可读存储介质中的计算机程序可在诸如客户端、主机、代理装置、服务器等计算机设备中部署的环境中运行,此外,在一个示例中,计算机程序以及任何相关联的数据、数据文件和数据结构分布在联网的计算机***上,使得计算机程序以及任何相关联的数据、数据文件和数据结构通过一个或多个处理器或计算机以分布式方式存储、访问和执行。
根据本公开的示例性实施例,还可提供一种计算机程序产品,该计算机程序产品中的指令可由计算机设备的处理器执行以完成根据本公开的示例性实施例的视频处理方法。
根据本公开的视频处理方法和视频处理装置,利用神经网络执行单图处理(即,第一区域填补),并利用特定融合机制考虑相邻帧信息执行相邻帧融合处理,能够自动化去除视频 中遮挡、广告等内容,无需利用多个前后帧信息和多次光流计算,在保证算法开销小、速度快(例如,15帧/秒的处理速度)的情况下,提升第一区域填补内容的质量,使得填补内容和原视频内容对比起来和谐、自然,填补完的视频能够让痕迹区域不再明显,和原视频难以区分,达到以假乱真的效果,从而提高用户观看体验。
根据本公开的视频处理方法和视频处理装置,能够实时地针对视频中的痕迹图案选择合适的第一区域,在不增加开销和干扰的情况下,充分利用周围信息以提高第一区域内容填补质量,并且无需提前标注好掩膜,对痕迹出现的位置、痕迹的形状、视频的种类均没有限制,都能稳定产生优良的处理结果。
根据本公开的视频处理方法和视频处理装置,利用柏松融合算法对处理图像执行背景融合,使得第一区域的填补内容能够更完美更自然地与图像背景融合,使得结果图像更和谐和自然。
本公开所有实施例均可以单独被执行,也可以与其他实施例相结合被执行,均视为本公开要求的保护范围。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。

Claims (24)

  1. 一种视频处理方法,包括:
    获取视频的当前帧图像和第一区域掩膜,其中所述第一区域与所述当前帧图像中期望去除的区域对应;
    基于所述当前帧图像和所述第一区域掩膜,利用图像处理网络,获得所述当前帧图像的第一结果图像,其中所述第一结果图像为在所述当前帧图像中去除了所述第一区域的图像;
    获取所述视频的所述当前帧图像的前一帧图像的第二结果图像,其中所述第二结果图像为在所述前一帧图像中去除了所述第一区域的图像;
    对所述当前帧图像的第一结果图像和所述前一帧图像的第二结果图像进行融合,获得所述当前帧图像的最终结果图像。
  2. 如权利要求1所述的视频处理方法,其中,所述第一区域是所述视频的图像中的特定矩形区域,其中,所述特定矩形区域以所述视频的图像的待处理图案的中心为中心点且以待处理图案最长边的两倍为边长。
  3. 如权利要求1所述的视频处理方法,其中,所述对所述当前帧图像的第一结果图像和所述前一帧图像的第二结果图像进行融合,包括:
    对所述当前帧图像的第一结果图像和所述前一帧图像的第二结果图像进行光流计算,获得相邻帧光流;
    基于获得的相邻帧光流对所述当前帧图像的第一结果图像和所述前一帧图像的第二结果图像进行采样,获得相邻帧对齐图像;
    对所述当前帧图像的第一结果图像和所述相邻帧对齐图像的第一区域像素的每个像素进行融合。
  4. 如权利要求3所述的视频处理方法,其中,所述对所述当前帧图像的第一结果图像和所述相邻帧对齐图像的第一区域像素的每个像素进行融合,包括:
    针对所述第一区域像素的每个像素,计算所述当前帧图像的第一结果图像的像素值和所述相邻帧对齐图像的像素值的统计值,作为该像素的像素值。
  5. 如权利要求1所述的视频处理方法,其中,所述前一帧图像的第二结果图像包括所述前一帧图像的第三结果图像和所述第四结果图像中的至少一个;
    其中,所述前一帧图像的第三结果图像是通过基于所述前一帧图像和所述第一区域掩膜,利用所述图像处理网络而获得的;所述前一帧图像的第四结果图像是通过对所述前一帧图像的第三结果图像和所述前一帧图像之前的一帧图像的第五结果图像进行融合而获得的。
  6. 如权利要求5所述的视频处理方法,其中,在所述前一帧图像的第二结果图像包括所述前一帧图像的第三结果图像和第四结果图像的情况下:
    所述对所述当前帧图像的第一结果图像和所述前一帧图像的第二结果图像进行光流计算,获得相邻光流,包括:
    对所述当前帧图像的第一结果图像和所述前一帧图像的第三结果图像进行光流计算,获 得第一相邻光流,
    对所述当前帧图像的第一结果图像和所述前一帧图像的第四结果图像进行光流计算,获得第二相邻光流;
    所述基于获得的相邻帧光流对所述当前帧图像的第一结果图像和所述前一帧图像的第二结果图像进行采样,获得相邻帧对齐图像,包括:
    基于第一相邻光流对所述当前帧图像的第一结果图像和所述前一帧图像的第三结果图像进行采样,获得第一相邻帧对齐图像,
    基于第二相邻光流对所述当前帧图像的第一结果图像和所述前一帧图像的第四结果图像进行采样,获得第二相邻帧对齐图像;
    所述对所述当前帧图像的第一结果图像和所述相邻帧对齐图像的第一区域像素的每个像素进行融合,包括:
    对所述当前帧图像的第一结果图像、第一相邻帧对齐图像和第二相邻帧对齐图像的第一区域像素的每个像素进行融合。
  7. 如权利要求6所述的视频处理方法,其中,所述针对所述第一区域像素的每个像素,计算所述当前帧图像的第一结果图像的像素值和所述相邻帧对齐图像的像素值的统计值,包括:
    针对所述第一区域像素的每个像素,计算所述当前帧图像的第一结果图像的像素值、第一相邻帧对齐图像的像素值和第二相邻帧对齐图像的像素值的中位数。
  8. 如权利要求1所述的视频处理方法,还包括:
    确定所述当前帧图像是否是所述视频的第一帧图像或者所述当前帧图像与所述前一帧图像相比是否发生场景切换;
    在所述当前帧图像是所述视频的第一帧图像或者所述当前帧图像与所述前一帧相比发生场景切换的情况下,不执行获取所述前一帧图像的第二结果图像的步骤和所述融合的步骤,并将所述当前帧图像的第一结果图像,作为所述当前帧图像的最终结果图像。
  9. 如权利要求8所述的视频处理方法,其中,所述确定所述当前帧图像与所述前一帧图像相比是否发生场景切换,包括:
    获取所述前一帧图像;
    计算所述当前帧图像与所述前一帧图像的每个像素的基于预定图像块的L2范数距离;
    计算每个像素的基于预定图像块的L2范数距离的平均值,作为所述当前帧图像与所述前一帧图像的差异值;
    在所述差异值大于预定阈值的情况下,确定所述当前帧图像与所述前一帧相比发生场景切换。
  10. 如权利要求1所述的视频处理方法,还包括:
    基于所述当前帧图像、所述当前帧图像的最终结果图像和所述第一区域掩膜,利用柏松融合算法,获得所述当前帧图像的第六结果图像,作为所述当前帧图像的最终结果图像。
  11. 如权利要求10所述的视频处理方法,其中,所述基于所述当前帧图像、所述当前 帧图像的最终结果图像和所述第一区域掩膜,利用柏松融合算法,获得所述当前帧图像的第六结果图像,包括:
    以所述第一区域掩膜中的第一区域为参考区域,计算在所述参考区域边界处所述当前帧图像的像素的像素值与所述当前帧图像的最终结果图像的像素的像素值之间的梯度;
    调整所述当前帧图像的最终结果图像在所述参考区域边界处的像素的像素值,直到所述梯度最小化;
    将所述梯度最小化时的调整后的所述当前帧图像的最终结果图像作为所述当前帧图像的第六结果图像。
  12. 一种视频处理装置,包括:
    获取单元,被配置为获取视频的当前帧图像和第一区域掩膜,以及获取所述视频的所述当前帧图像的前一帧图像的第二结果图像,其中所述第一区域与所述当前帧图像中期望去除的区域对应,所述第二结果图像为在所述前一帧图像中去除了所述第一区域的图像;
    处理单元,被配置为基于所述当前帧图像和所述第一区域掩膜,利用图像处理网络,获得所述当前帧图像的第一结果图像,其中所述第一结果图像为在所述当前帧图像中去除了所述第一区域的图像;
    融合单元,被配置为对所述当前帧图像的第一结果图像和所述前一帧图像的第二结果图像进行融合,获得所述当前帧图像的最终结果图像。
  13. 如权利要求12所述的视频处理装置,其中,所述第一区域是所述视频的图像中的特定矩形区域,其中,所述特定矩形区域以所述视频的图像的待处理图案的中心为中心点且以待处理图案最长边的两倍为边长。
  14. 如权利要求12所述的视频处理装置,其中,融合单元被配置为:对所述当前帧图像的第一结果图像和所述前一帧图像的第二结果图像进行光流计算,获得相邻帧光流;
    基于获得的相邻帧光流对所述当前帧图像的第一结果图像和所述前一帧图像的第二结果图像进行采样,获得相邻帧对齐图像;
    对所述当前帧图像的第一结果图像和所述相邻帧对齐图像的第一区域像素的每个像素进行融合。
  15. 如权利要求14所述的视频处理装置,其中,融合单元被配置为:针对所述第一区域像素的每个像素,计算所述当前帧图像的第一结果图像的像素值和所述相邻帧对齐图像的像素值的统计值,作为该像素的像素值。
  16. 如权利要求12所述的视频处理装置,其中,所述前一帧图像的第二结果图像包括所述前一帧图像的第三结果图像和所述第四结果图像中的至少一个;
    其中,所述前一帧图像的第三结果图像是通过基于所述前一帧图像和所述第一区域掩膜,利用所述图像处理网络而获得的;所述前一帧图像的第四结果图像是通过对所述前一帧图像的第一结果图像和所述前一帧图像之前的一帧图像的第五结果图像进行融合而获得的。
  17. 如权利要求16所述的视频处理装置,其中,在所述前一帧图像的第二结果图像包括所述前一帧图像的第三结果图像和第四结果图像的情况下:
    融合单元被配置为:
    对所述当前帧图像的第一结果图像和所述前一帧图像的第三结果图像进行光流计算,获得第一相邻光流,
    对所述当前帧图像的第一结果图像和所述前一帧图像的第四结果图像进行光流计算,获得第二相邻光流,
    基于第一相邻光流对所述当前帧图像的第一结果图像和所述前一帧图像的第三结果图像进行采样,获得第一相邻帧对齐图像,
    基于第二相邻光流对所述当前帧图像的第一结果图像和所述前一帧图像的第四结果图像进行采样,获得第二相邻帧对齐图像,
    对所述当前帧图像的第一结果图像、第一相邻帧对齐图像和第二相邻帧对齐图像的第一区域像素的每个像素进行融合。
  18. 如权利要求17所述的视频处理装置,其中,融合单元被配置为:
    针对所述第一区域像素的每个像素,计算所述当前帧图像的第一结果图像的像素值、第一相邻帧对齐图像的像素值和第二相邻帧对齐图像的像素值的中位数。
  19. 如权利要求12所述的视频处理装置,还包括:确定单元,被配置为:确定所述当前帧图像是否是所述视频的第一帧图像或者所述当前帧图像与所述前一帧图像相比是否发生场景切换;
    在所述当前帧图像是所述视频的第一帧图像或者所述当前帧图像与所述前一帧相比发生场景切换的情况下,获取单元不获取所述前一帧图像的第二结果图像,融合单元不执行操作,并处理单元将所述当前帧图像的第一结果图像,作为所述当前帧图像的最终结果图像。
  20. 如权利要求19所述的视频处理装置,其中,
    获取单元被配置为:获取所述前一帧图像;
    确定单元被配置为:计算所述当前帧图像与所述前一帧图像的每个像素的基于预定图像块的L2范数距离,
    计算每个像素的基于预定图像块的L2范数距离的平均值,作为所述当前帧图像与所述前一帧图像的差异值,
    在所述差异值大于预定阈值的情况下,确定所述当前帧图像与所述前一帧相比发生场景切换。
  21. 如权利要求12所述的视频处理装置,还包括:背景融合单元,被配置为:基于所述当前帧图像、所述当前帧图像的最终结果图像和所述第一区域掩膜,利用柏松融合算法,获得所述当前帧图像的第六结果图像,作为所述当前帧图像的最终结果图像。
  22. 如权利要求21所述的视频处理装置,其中,背景融合单元被配置为:
    以所述第一区域掩膜中的第一区域为参考区域,计算在所述参考区域边界处所述当前帧图像的像素的像素值与所述当前帧图像的最终结果图像的像素的像素值之间的梯度;
    调整所述当前帧图像的最终结果图像在所述参考区域边界处的像素的像素值,直到所述梯度最小化;
    将所述梯度最小化时的调整后的所述当前帧图像的最终结果图像作为所述当前帧图像的第六结果图像。
  23. 一种电子设备,包括:
    至少一个处理器;
    至少一个存储计算机可执行指令的存储器,
    其中,所述计算机可执行指令在被所述至少一个处理器运行时,促使所述至少一个处理器执行以下步骤:
    获取视频的当前帧图像和第一区域掩膜,其中所述第一区域与所述当前帧图像中期望去除的区域对应;
    基于所述当前帧图像和所述第一区域掩膜,利用图像处理网络,获得所述当前帧图像的第一结果图像,其中所述第一结果图像为在所述当前帧图像中去除了所述第一区域的图像;
    获取所述视频的所述当前帧图像的前一帧图像的第二结果图像,其中所述第二结果图像为在所述前一帧图像中去除了所述第一区域的图像;
    对所述当前帧图像的第一结果图像和所述前一帧图像的第二结果图像进行融合,获得所述当前帧图像的最终结果图像。
  24. 一种存储指令的计算机可读存储介质,其中,当所述指令被至少一个处理器运行时,促使所述至少一个处理器执行以下步骤:
    获取视频的当前帧图像和第一区域掩膜,其中所述第一区域与所述当前帧图像中期望去除的区域对应;
    基于所述当前帧图像和所述第一区域掩膜,利用图像处理网络,获得所述当前帧图像的第一结果图像,其中所述第一结果图像为在所述当前帧图像中去除了所述第一区域的图像;
    获取所述视频的所述当前帧图像的前一帧图像的第二结果图像,其中所述第二结果图像为在所述前一帧图像中去除了所述第一区域的图像;
    对所述当前帧图像的第一结果图像和所述前一帧图像的第二结果图像进行融合,获得所述当前帧图像的最终结果图像。
PCT/CN2021/106339 2020-10-15 2021-07-14 视频处理方法和视频处理装置 WO2022077978A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
MX2022007387A MX2022007387A (es) 2020-10-15 2021-07-14 Metodo y aparato para procesar video.
EP21879026.9A EP4060602A1 (en) 2020-10-15 2021-07-14 Video processing method and video processing apparatus
US17/742,466 US11538141B2 (en) 2020-10-15 2022-05-12 Method and apparatus for processing video

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011104678.6 2020-10-15
CN202011104678.6A CN112233055B (zh) 2020-10-15 2020-10-15 视频去痕方法和视频去痕装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/742,466 Continuation US11538141B2 (en) 2020-10-15 2022-05-12 Method and apparatus for processing video

Publications (1)

Publication Number Publication Date
WO2022077978A1 true WO2022077978A1 (zh) 2022-04-21

Family

ID=74118366

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/106339 WO2022077978A1 (zh) 2020-10-15 2021-07-14 视频处理方法和视频处理装置

Country Status (5)

Country Link
US (1) US11538141B2 (zh)
EP (1) EP4060602A1 (zh)
CN (1) CN112233055B (zh)
MX (1) MX2022007387A (zh)
WO (1) WO2022077978A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112233055B (zh) 2020-10-15 2021-09-10 北京达佳互联信息技术有限公司 视频去痕方法和视频去痕装置
CN112837234B (zh) * 2021-01-25 2022-07-22 重庆师范大学 一种基于多列门控卷积网络的人脸图像修复方法
CN114302252A (zh) * 2021-12-31 2022-04-08 深圳万兴软件有限公司 视频去除水印的方法、装置、计算机设备及存储介质
CN114598923A (zh) * 2022-03-08 2022-06-07 北京达佳互联信息技术有限公司 视频文字清除方法、装置、电子设备及存储介质
CN116958203A (zh) * 2023-08-01 2023-10-27 北京知存科技有限公司 一种图像处理方法、装置、电子设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080246777A1 (en) * 2007-04-03 2008-10-09 Richard Lee Swanson Method and apparatus for background replacement in still photographs
CN110443764A (zh) * 2019-08-01 2019-11-12 北京百度网讯科技有限公司 视频修复方法、装置及服务器
CN110636373A (zh) * 2019-10-18 2019-12-31 厦门美图之家科技有限公司 图像处理方法、装置及电子设备
CN111145135A (zh) * 2019-12-30 2020-05-12 腾讯科技(深圳)有限公司 一种图像去扰处理方法、装置、设备及存储介质
CN112233055A (zh) * 2020-10-15 2021-01-15 北京达佳互联信息技术有限公司 视频去痕方法和视频去痕装置

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB0029855D0 (en) * 2000-04-05 2001-01-24 Sony Uk Ltd Embedding data in material and removing the embedded data
CN105391952B (zh) * 2014-09-03 2019-04-16 芯视达***公司 具有内置广播及商业模型的图像处理设备
CN105898322A (zh) * 2015-07-24 2016-08-24 乐视云计算有限公司 一种视频去水印方法及装置
CN105894470A (zh) * 2016-03-31 2016-08-24 北京奇艺世纪科技有限公司 一种图像处理方法及装置
CN107146199B (zh) * 2017-05-02 2020-01-17 厦门美图之家科技有限公司 一种人脸图像的融合方法、装置及计算设备
US11494934B2 (en) * 2018-03-29 2022-11-08 Mitsubishi Electric Corporation Image processing device, image processing method, and monitoring system
CN109214999B (zh) * 2018-09-21 2021-01-22 阿里巴巴(中国)有限公司 一种视频字幕的消除方法及装置
WO2021080158A1 (en) * 2019-10-25 2021-04-29 Samsung Electronics Co., Ltd. Image processing method, apparatus, electronic device and computer readable storage medium
CN111583087B (zh) * 2020-05-06 2023-09-05 杭州小影创新科技股份有限公司 一种图像去水印方法
CN111654747B (zh) * 2020-06-12 2022-07-26 杭州海康威视数字技术股份有限公司 弹幕显示方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080246777A1 (en) * 2007-04-03 2008-10-09 Richard Lee Swanson Method and apparatus for background replacement in still photographs
CN110443764A (zh) * 2019-08-01 2019-11-12 北京百度网讯科技有限公司 视频修复方法、装置及服务器
CN110636373A (zh) * 2019-10-18 2019-12-31 厦门美图之家科技有限公司 图像处理方法、装置及电子设备
CN111145135A (zh) * 2019-12-30 2020-05-12 腾讯科技(深圳)有限公司 一种图像去扰处理方法、装置、设备及存储介质
CN112233055A (zh) * 2020-10-15 2021-01-15 北京达佳互联信息技术有限公司 视频去痕方法和视频去痕装置

Also Published As

Publication number Publication date
CN112233055A (zh) 2021-01-15
CN112233055B (zh) 2021-09-10
EP4060602A1 (en) 2022-09-21
US11538141B2 (en) 2022-12-27
US20220309623A1 (en) 2022-09-29
MX2022007387A (es) 2022-07-13

Similar Documents

Publication Publication Date Title
WO2022077978A1 (zh) 视频处理方法和视频处理装置
US10755173B2 (en) Video deblurring using neural networks
US10671855B2 (en) Video object segmentation by reference-guided mask propagation
US11017586B2 (en) 3D motion effect from a 2D image
US20180158199A1 (en) Image alignment for burst mode images
AU2019219764A1 (en) Foolproof group photo on handheld mobile devices via smart mix and match
CN109753971B (zh) 扭曲文字行的矫正方法及装置、字符识别方法及装置
CN109872304A (zh) 图像缺陷检测方法及装置、电子设备、存储介质
US10701279B2 (en) Utilizing alignment models and motion vector path blending to generate a long exposure digital image from a sequence of short exposure digital images
CN111553362B (zh) 一种视频处理方法、电子设备和计算机可读存储介质
US11869172B2 (en) Kernel reshaping-powered splatting-based efficient image space lens blur
CN103685866B (zh) 视频稳像方法及其装置
CN111160340B (zh) 一种运动目标检测方法、装置、存储介质及终端设备
CN115018734B (zh) 视频修复方法和视频修复模型的训练方法、装置
CN112991419B (zh) 视差数据生成方法、装置、计算机设备及存储介质
CN114140488A (zh) 视频目标分割方法及装置、视频目标分割模型的训练方法
CN112052863B (zh) 一种图像检测方法及装置、计算机存储介质、电子设备
CN112967366A (zh) 一种体积光渲染方法、装置、电子设备及存储介质
US11935214B2 (en) Video content removal using flow-guided adaptive learning
CN113610713B (zh) 视频超分辨模型的训练方法、视频超分辨方法及装置
WO2024127554A1 (ja) 情報処理装置、推論方法、推論プログラム、および特徴量生成モデルの生成方法
WO2023072072A1 (zh) 一种模糊图像生成方法、网络模型训练方法及装置
CN109427071A (zh) 一种全搜索块匹配方法和装置
CN117058040A (zh) 画质修复模型训练方法、装置、设备及存储介质
CN114266785A (zh) 光流预测方法、装置、电子设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21879026

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021879026

Country of ref document: EP

Effective date: 20220613

NENP Non-entry into the national phase

Ref country code: DE