CN112819699A - Video processing method and device and electronic equipment - Google Patents

Video processing method and device and electronic equipment Download PDF

Info

Publication number
CN112819699A
CN112819699A CN201911118706.7A CN201911118706A CN112819699A CN 112819699 A CN112819699 A CN 112819699A CN 201911118706 A CN201911118706 A CN 201911118706A CN 112819699 A CN112819699 A CN 112819699A
Authority
CN
China
Prior art keywords
image frame
original image
area
video
frame
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911118706.7A
Other languages
Chinese (zh)
Inventor
熊宝玉
汪贤
鲁方波
成超
陈熊
张海斌
樊鸿飞
李果
张玉梅
蔡媛
张文杰
豆修鑫
许道远
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Beijing Kingsoft Cloud Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Beijing Kingsoft Cloud Technology Co Ltd
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 Beijing Kingsoft Cloud Network Technology Co Ltd, Beijing Kingsoft Cloud Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN201911118706.7A priority Critical patent/CN112819699A/en
Priority to PCT/CN2020/127717 priority patent/WO2021093718A1/en
Publication of CN112819699A publication Critical patent/CN112819699A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4053Scaling of whole images or parts thereof, e.g. expanding or contracting based on super-resolution, i.e. the output image resolution being higher than the sensor resolution
    • 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
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)

Abstract

The invention relates to a video processing method and device and electronic equipment. The method comprises the following steps: acquiring an original image frame in a first video; determining a first area in an original image frame, wherein the original image frame comprises the first area and a second area, the first area in the original image frame is in an underexposure state, and the second area in the original image frame is not in the underexposure state; performing enhancement processing on an original image frame to obtain a target image frame, wherein the enhancement processing is used for adjusting the exposure states of different areas in the image to be in an exposure normal state, and a first area and a second area in the target image frame are both in the exposure normal state; and generating a second video according to the target image frame.

Description

Video processing method and device and electronic equipment
Technical Field
The present invention relates to the field of video processing technologies, and in particular, to a video processing method, a video processing apparatus, an electronic device, and a computer-readable storage medium.
Background
Under the influence of factors such as long time and limited technology, the playing quality of old movies such as old movies and old television shows is not ideal, and for example, the problems of unclear images, unsmooth playing and the like exist. Therefore, it is necessary to process old movies to improve the playing quality thereof.
The manual method for repairing the old film wastes time and labor, has higher cost and unstable processing result, and is particularly difficult to be applied to the old film with longer duration such as the old TV play. If the old film is automatically processed based on algorithms such as image processing, a technical scheme capable of integrally improving the playing quality of the old film needs to be provided.
Disclosure of Invention
It is an object of the present invention to provide a new solution for video processing.
According to a first aspect of the present invention, there is provided a video processing method comprising:
acquiring an original image frame in a first video;
determining a first area in the original image frame, wherein the original image frame comprises the first area and a second area, the first area in the original image frame is in an underexposure state, and the second area in the original image frame is not in the underexposure state;
performing enhancement processing on the original image frame to obtain a target image frame, wherein the enhancement processing is used for adjusting the exposure states of different areas in the image to an exposure normal state, and a first area and a second area in the target image frame are both in the exposure normal state;
and generating a second video according to the target image frame.
Optionally, the enhancing the original image frame to obtain a target image frame includes:
performing contrast enhancement processing on the original image frame to obtain an auxiliary image frame, wherein a first area in the auxiliary image frame is in an exposure normal state, and a second area in the auxiliary image frame is in an overexposure state;
and carrying out image fusion on the original image frame and the auxiliary image frame to obtain the target image frame.
Optionally, the fusing the original image frame and the auxiliary image frame to obtain the target image frame includes:
acquiring illumination weight information of the original image, wherein the illumination weight information is used for indicating an illumination weight corresponding to each pixel point in the original image, and the illumination weight is related to the brightness of the corresponding pixel point;
and carrying out image fusion on the original image and the auxiliary image frame according to the illumination weight information to obtain the target image frame.
Optionally, before obtaining an auxiliary image frame by performing contrast enhancement processing on the original image frame, the method further includes:
denoising the original image frame to obtain an updated original image frame, wherein the denoising process is used for reducing the noise of the image;
and performing the contrast enhancement processing on the original image frame based on the updated original image frame to obtain an auxiliary image frame.
Optionally, before obtaining the auxiliary image frame by performing contrast enhancement processing on the original image frame, the method includes:
performing edge enhancement processing on the original image frame to obtain an updated original image frame, wherein the edge enhancement processing is used for improving the definition of a contour edge in the image;
and performing contrast enhancement processing on the original image frame based on the updated original image frame to obtain an auxiliary image frame.
Optionally, after the fusing the original image frame and the auxiliary image frame to obtain the target image frame, the method further includes:
and performing super-resolution processing on the target image frame, wherein the super-resolution processing is used for improving the resolution of the image.
Optionally, after the generating a second video according to the target image frame, further includes:
and performing super-frame rate processing on the second video to obtain a third video for playing, wherein the super-frame rate processing is used for improving the frame rate of the video.
According to a second aspect of the present invention, there is provided a video processing apparatus comprising:
the image extraction module is used for acquiring an original image frame in a first video;
the image analysis module is used for determining a first area in the original image frame, wherein the original image frame comprises the first area and a second area, the first area in the original image frame is in an underexposure state, and the second area in the original image frame is not in the underexposure state;
the enhancement processing module is used for carrying out enhancement processing on the original image frame to obtain a target image frame, wherein the enhancement processing is used for adjusting the exposure states of different areas in the image to be in a normal exposure state, and a first area and a second area in the target image frame are both in the normal exposure state;
and the video generation module is used for generating a second video according to the target image frame.
According to a third aspect of the present invention, there is provided an electronic apparatus comprising:
a memory for storing executable commands;
a processor for performing the method of the first aspect of the invention under control of the executable command.
According to a fourth aspect of the present invention, there is provided a computer-readable storage medium, characterized in that executable commands are stored, which when executed by a processor, implement the method according to the first aspect of the present invention.
In the video processing method in this embodiment, the original image frame is subjected to enhancement processing, so that the underexposed area in the original image frame is adjusted to the normal exposure state, and meanwhile, the overexposure of the area in the normal exposure state in the original image frame is also prevented, which is beneficial to improving the image quality of the video.
Other features of the present invention and advantages thereof will become apparent from the following detailed description of exemplary embodiments thereof, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 shows a schematic diagram of an electronic device that may be used to implement an embodiment of the invention.
Fig. 2 shows a flow chart of a video processing method according to an embodiment of the invention.
Fig. 3 shows a flowchart of a specific example of a video processing method according to an embodiment of the present invention.
Detailed Description
Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail, but are intended to be part of the specification where appropriate.
In all examples shown and discussed herein, any particular value should be construed as merely illustrative, and not limiting. Thus, other examples of the exemplary embodiments may have different values.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
< hardware configuration >
Fig. 1 shows a schematic diagram of a hardware configuration of an electronic device that can be used to implement an embodiment of the invention.
The electronic device 1100 may be a laptop computer, desktop computer, tablet computer, or the like.
As shown in fig. 1, electronic device 1100 may include a processor 1110, a memory 1120, an interface device 1130, a communication device 1140, a display device 1150, and an input device 1160. The processor 1110 may be a central processing unit CPU, a microprocessor MCU, or the like. The memory 1120 includes, for example, a ROM (read only memory), a RAM (random access memory), a nonvolatile memory such as a hard disk, and the like. The interface device 1130 includes, for example, a USB interface, a headphone interface, and the like. The communication device 1140 is capable of wired or wireless communication, for example. The display device 1150 is, for example, a liquid crystal display panel, a touch panel, or the like. Input devices 1160 may include, for example, a touch screen, a keyboard, and the like.
In an embodiment applied to this description, the memory 1120 of the electronic device 1100 is configured to store instructions for controlling the processor 1110 to operate so as to support implementing the video processing method according to any embodiment of this description. The skilled person can design the instructions according to the solution disclosed in the present specification. How the instructions control the operation of the processor is well known in the art and will not be described in detail herein.
It should be understood by those skilled in the art that although a plurality of means of the electronic device 1100 are shown in fig. 1, the electronic device 1100 of the present specification may refer to only some of the means therein, for example, the processor 1110, the memory 1120, the display device 1150, the input device 1160, etc.
The electronic device 1100 shown in fig. 1 is merely illustrative and is in no way intended to limit the specification, its application, or uses.
< method examples >
The present embodiment provides a video processing method, which is implemented, for example, by electronic device 1100 in fig. 1. As shown in fig. 2, the method includes the following steps S1100-S1400.
In step S1100, original image frames in a first video are acquired.
In the present embodiment, the first video is a video whose image quality needs to be improved, and is, for example, a video of a type such as an old movie or an old tv show.
The image frame is the smallest unit that constitutes the video. One image frame is a still picture. Based on the persistence of vision effect of human eyes, a plurality of image frames are rapidly played in sequence to form a video. The original image frame in the present embodiment is an image frame for forming the first video, and the number thereof is plural.
In this embodiment, a special video processing tool may be utilized to obtain the original image frames in the first video. For example, the video may be cut into a plurality of image frames using the video processing software FFmpeg. FFmpeg is a set of open source computer programs that can be used to record, convert digital audio, video, and convert them into streams. It provides a complete solution for recording, converting and streaming audio and video. In one example, the video may be decomposed into a sequence of pictures by means of an "FFmpeg-i video image% d.jpg" command in FFmpeg software, resulting in the original image frames in the first video.
In step S1200, a first region is determined in an original image frame, where the original image frame includes the first region and a second region, the first region in the original image frame is in an underexposed state, and the second region in the original image frame is not in the underexposed state.
Generally, due to the influence of factors such as the imaging technology and the environment, abnormal exposure such as underexposure and overexposure may occur in the captured picture. Here, underexposure refers to underexposure, which is expressed as a lack of detail in a darker area of the image, and overexposure refers to overexposure, which is expressed as a lack of detail in a lighter area of the image. Videos of the type of old movies, old television shows, etc. often suffer from under-exposure.
In this embodiment, the original image frame may be divided into a plurality of sub-regions, and then the exposure state of each sub-region is determined, so as to determine the region in the underexposure state, i.e., the first region.
When dividing the sub-region, the original image frame may be uniformly divided into a plurality of grids, the grid shape is, for example, a square, a regular hexagon, or the like, and each grid is taken as one sub-region.
When the sub-regions are divided, the image contour in the original image frame can be determined first, and the region in each image contour is used as one sub-region.
When the exposure state is determined, the determination may be made based on the average value of the pixels in the sub-area in combination with the shooting environment. For example, for an image taken in the daytime, if the average value of the pixels in the sub-area exceeds 120 and does not exceed 150, it is determined that the sub-area is in the exposure normal state, if the average value of the pixels in the sub-area does not exceed 120, it is determined that the sub-area is in the underexposure state, and if the average value of the pixels in the sub-area exceeds 150, it is determined that the sub-area is in the overexposure state.
When the exposure state is judged, the judgment can be carried out according to the brightness distribution of the subareas. For example, if the peak value of the luminance histogram of the sub-region is concentrated on the right side, it is determined that the sub-region is in the overexposure state, if the peak value of the luminance histogram of the sub-region is concentrated on the left side, it is determined that the sub-region is in the underexposure state, and if the peak value distribution of the luminance histogram of the sub-region is uniform, it is determined that the sub-region is in the exposure normal state.
In step S1300, an original image frame is enhanced to obtain a target image frame, where the enhancement is used to adjust the exposure states of different areas in the image to an exposure normal state, and both the first area and the second area in the target image frame are in the exposure normal state.
In this embodiment, the original image frame is enhanced, and the enhancement can adjust the exposure states of different areas of the image to the exposure normal state. The first region in the target image frame corresponds to the first region in the original image frame and the second region in the target image frame corresponds to the second region in the original image frame.
In one embodiment, step S1300 further includes: performing contrast enhancement processing on an original image frame to obtain an auxiliary image frame, wherein a first area in the auxiliary image frame is in an exposure normal state, and a second area in the auxiliary image frame is in an overexposure state; and carrying out image fusion on the original image frame and the auxiliary image frame to obtain a target image frame.
In the processing method commonly used in the prior art of contrast enhancement processing, while the area originally in the underexposed state is adjusted to the normally exposed state, the area originally in the normally exposed state is often adjusted to the overexposed state.
In this embodiment, the auxiliary image frame is obtained by performing contrast enhancement processing on the original image frame. The contrast enhancement processing may adopt specific methods such as histogram equalization and gray scale conversion.
In this embodiment, the target image frame is obtained by performing image fusion on the original image frame and the auxiliary image frame. The image fusion refers to a process of synthesizing information of two images to obtain a target image.
In one embodiment, the process of image fusion includes: acquiring illumination weight information of an original image frame, wherein the illumination weight information is used for indicating an illumination weight corresponding to each pixel point in the original image frame, and the illumination weight is related to the brightness of the corresponding pixel point; and carrying out image fusion on the original image frame and the auxiliary image frame according to the illumination weight information to obtain a target image frame.
The illumination weight information can represent the light and shade intensity of the original image frame, and the illumination weight and the brightness of the corresponding pixel point can be in positive correlation or negative correlation. Optionally, the illumination weight information may be characterized by a weight image, the size of the weight image is consistent with the size of the original image; taking the illumination weight as an example that the illumination weight is positively correlated with the brightness of the corresponding pixel point, the illumination weight corresponding to the darker area (first area) in the weighted image is smaller, and the illumination weight corresponding to the brighter area (second area) in the original image frame is larger.
Alternatively, the original image frame and the weighted image may be represented in the form of an image matrix (two-dimensional matrix), where rows of the image matrix correspond to heights of the image (in pixels), columns of the image matrix correspond to widths of the image (in pixels), elements in the image matrix of the original image frame correspond to pixel values of pixels in the original image frame, and elements in the image matrix of the weighted image (illumination weights) relate to luminances of pixels in the original image frame. The image matrix of the original image frame and the image matrix of the weighted image are the same in the number of rows and the number of columns, and two elements of the original image frame and the weighted image at the same position correspond to the same pixel point in the original image.
When the original image frame and the auxiliary image frame are subjected to image fusion, different fusion weights can be respectively distributed to the original image frame and the auxiliary image frame based on illumination weight information, so that for an area (a first area) with weak illumination, the fusion weight of the original image frame is smaller, and the fusion weight of the auxiliary image frame is larger; for the region (second region) with stronger illumination, the fusion weight of the original image frame is larger, and the fusion weight of the auxiliary image frame is smaller. Therefore, the brightness of the partial image of the exposed normal area or the overexposed area in the original image can be kept unchanged, the partial image of the darker area is enhanced, namely the darker area (the first area) in the original image is enhanced, the brighter area (the second area) is not excessively exposed after the image is enhanced, and the color of the image is not distorted, so that the problems that the enhancement effect of the darker area in the image is insufficient, the brighter area is easily excessively enhanced and the color is distorted in the prior art are effectively solved.
In one example, the auxiliary image frame and the original image frame may be fused on a pixel-by-pixel basis. For example, for a pixel a1 in the original image frame (the pixel value of the pixel is denoted as a1) and a pixel a2 in the auxiliary image frame (the pixel value of the pixel is denoted as a2), assuming that the illumination weight of the pixel a1 is p, and the pixel a1 and the pixel a2 are merged to obtain a pixel A3, the pixel value A3 of the pixel A3 is a1 p + a2 (1-p).
In this embodiment, the illumination weight is related to the brightness of the corresponding pixel point, for example, the illumination weight corresponding to the pixel point with higher brightness is also higher. In one example, the original image frame has pixels in the first region with an illumination weight of 0 and pixels in the second region with an illumination weight of 1. In another example, the illumination weight of the pixels in the first region in the original image frame is 0.2, and the illumination weight of the pixels in the second region is 0.7.
It is easily understood that the illumination weight in the present embodiment is such that, in the fusion process, the first region in the original image frame contributes less to the target image frame, and the second region in the original image frame contributes more to the target image frame. Therefore, the target image frame can effectively keep the brightness information of the second area in the original image frame while improving the brightness of the first area in the original image frame, and the overexposure phenomenon is prevented.
In step S1400, a second video is generated from the target image frame.
In this embodiment, the target image frames are sequentially spliced into a video, that is, a processed video, that is, a second video is obtained.
In the video processing method in this embodiment, the original image frame is subjected to enhancement processing, so that the underexposed area in the original image frame is adjusted to the normal exposure state, and meanwhile, the overexposure of the area in the normal exposure state in the original image frame is also prevented, which is beneficial to improving the image quality of the video.
In one embodiment, before obtaining the auxiliary image frame by performing contrast enhancement processing on the original image frame, the video processing method further includes: denoising the original image frame to obtain an updated original image frame, wherein the denoising is used for reducing the noise of the image; and performing a step of obtaining an auxiliary image frame by performing contrast enhancement processing on the original image frame based on the updated original image frame.
Image noise refers to unnecessary or unnecessary interference information present in the image data. The cause of image noise generation generally involves a number of aspects. For example, in the image capturing stage, image noise is caused by internal factors such as the characteristics of the photoelectric sensor, mechanical motion of the device, materials of the device, and circuits of the device, and external factors such as electromagnetic wave interference. After the image acquisition is finished, new noise is brought in links of image data transmission, decompression and the like. Image noise affects the picture quality of older films.
In this embodiment, denoising processing is performed on noise in an original image frame. The noise in the image can be removed by means of an average filter, an adaptive wiener filter, a median filter, a morphological noise filter, wavelet denoising and the like.
In one embodiment, the denoising process for reducing image noise is performed on an original image frame, and comprises the following steps: and carrying out denoising processing for reducing image noise on the original image frame through a pre-trained denoising model.
In this embodiment, based on the neural network model, the mixed noise formed by the acquisition noise, the compression noise, and the like in the image frame is subjected to denoising processing.
In one embodiment, a denoising model is generated prior to performing denoising processing. The process of generating the denoising model comprises the following steps: adding noise with random intensity into an original image to obtain a noise image; and training the convolutional neural network model according to the original image and the noise image to obtain a denoising model.
In this embodiment, the original image is a picture with high picture quality. The random noise added to the original image is, for example, gaussian noise, salt and pepper noise, or the like.
In this embodiment, a form of a convolutional neural network is adopted to generate a denoising model. Convolutional Neural Networks (CNN) are a type of feed-forward Neural network that includes convolution calculations and has a deep structure, and are one of the representative algorithms of deep learning (deep learning).
In this embodiment, a training data set is formed from an original image and a noise image, and a convolutional neural network is trained, where the noise image is used as an input of the convolutional neural network and the original image is used as an output of the neural network. And the trained convolutional neural network model is the denoising model.
In one embodiment, before obtaining the auxiliary image frame by performing contrast enhancement processing on the original image frame, the video processing method further includes: performing edge enhancement processing on the original image frame to obtain an updated original image frame, wherein the edge enhancement processing is used for improving the definition of a contour edge in the image; and performing a step of obtaining an auxiliary image frame by performing contrast enhancement processing on the original image frame based on the updated original image frame.
In early video, the edge boundaries of different regions were blurred. In the embodiment, the image frame is subjected to edge enhancement, which is beneficial to improving the definition of the video.
In this embodiment, the edge enhancement processing may be performed by methods such as high-pass filtering and spatial differentiation. In one example, the edge enhancement is performed by adopting a spatial domain differential method, the gradient value is calculated by a gradient modulus operator, and the change of the gray scale at the edge is large, so that the detail at the edge can be highlighted by enhancing the gray scale value of the pixel with the large gradient value, and the purpose of edge enhancement is achieved.
In one embodiment, after the original image frame and the auxiliary image frame are fused to obtain the target image frame, the video processing method further includes: and performing super-resolution processing on the target image frame, wherein the super-resolution processing is used for improving the resolution of the image.
The resolution of early video was limited in size by hardware constraints. In the embodiment, the image frames are subjected to super-resolution processing to obtain images with higher resolution, so that the method is favorable for adapting to the existing display equipment.
In this embodiment, the super-resolution processing may be performed on the image frame based on a sparse coding method, a self-modeling method, a bayesian method, a pyramid algorithm, a deep learning method, or the like.
In one embodiment of the present invention, the super-resolution processing includes: and performing super-resolution processing for improving the image resolution on the target image frame after dark field enhancement processing by using a pre-trained super-resolution model.
In this embodiment, the target image frame is subjected to super-resolution processing based on the neural network model.
In one embodiment, the super-resolution model is generated prior to the super-resolution processing. The process of generating the super-resolution model comprises the following steps: compressing the sample image to obtain a low-resolution image; and training the convolutional neural network model according to the sample image and the low-resolution image to obtain a super-resolution model.
In this embodiment, a high-resolution picture is selected as a sample image.
In this embodiment, a low-resolution image is obtained by performing quality compression on a sample image.
In this embodiment, a training data set is formed according to a sample image and a low-resolution image, and a convolutional neural network is trained, where the low-resolution image is used as an input of the convolutional neural network, and the sample image is used as an output of the neural network. The trained convolutional neural network model is the super-resolution model.
In one embodiment, after generating the second video according to the target image frame, the method further includes: and performing super-frame rate processing on the second video to obtain a third video for playing, wherein the super-frame rate processing is used for improving the frame rate of the video.
The frame rate of early movies is usually low, which affects the smoothness of video playback. In the embodiment, the super-frame rate processing is performed on the video, so that the video playing is smoother.
In this embodiment, the super-frame rate processing may be performed by using a simple frame rate lifting algorithm, a frame rate lifting algorithm with motion compensation, a frame rate lifting algorithm based on an autoregressive model, and other methods.
In one example, the super-frame rate processing is performed by using a frame averaging method in a simple frame rate lifting algorithm, that is, a weighted average result of two adjacent frames of the second video is used as an interpolation frame and added between the two frames, and an original frame of the second video and the interpolation frame obtained by interpolation processing are sequentially spliced to obtain a third video.
Fig. 3 shows a specific example of the implementation of the video processing method in the present embodiment. Referring to fig. 3, the electronic device first cuts the video into a plurality of image frames using the FFmpeg video processing tool, i.e., performs step S101. For each image frame, the electronic device inputs the image frame into a pre-trained convolutional neural network model to obtain a denoised image frame, i.e., step S102 is executed. For each image frame after denoising, the electronic device performs edge sharpening processing on the image frame by using a filtering or matrix-based edge sharpening method, that is, step S103 is executed. For each image frame after edge enhancement, the electronic device constructs an auxiliary image by using the existing image enhancement method, and fuses the image frame and the auxiliary image according to a specific weight, so as to improve the image quality of a weak brightness region in the image frame and keep the brightness of a strong brightness region in the image frame unchanged, i.e. step S105 is executed. For each image frame after the dark field enhancement processing, the electronic device inputs the image frame into a pre-trained convolutional neural network to obtain an image frame with higher resolution, namely, step S106 is executed. For the plurality of image frames after the super-resolution processing, the electronic device inserts a new image frame therein based on the frame rate lifting algorithm of the autoregressive model, i.e. performs step S107. For the plurality of image frames after the frame interpolation processing, the electronic device sequentially stitches the image frames into a video to obtain a processed video, i.e., step S108 is performed.
< apparatus embodiment >
The embodiment provides a video processing device which comprises an image extraction module, an image analysis module, an enhancement processing module and a video generation module.
And the image extraction module is used for acquiring an original image frame in the first video.
The image analysis module is used for determining a first area in an original image frame, wherein the original image frame comprises the first area and a second area, the first area in the original image frame is in an underexposure state, and the second area in the original image frame is not in the underexposure state.
And the enhancement processing module is used for carrying out enhancement processing on the original image frame to obtain a target image frame, wherein the enhancement processing is used for adjusting the exposure states of different areas in the image to be in an exposure normal state, and the first area and the second area in the target image frame are both in the exposure normal state.
And the video generation module is used for generating a second video according to the target image frame.
In one embodiment, the enhancement processing module, when performing enhancement processing on the original image frame to obtain the target image frame, is configured to: performing contrast enhancement processing on an original image frame to obtain an auxiliary image frame, wherein a first area in the auxiliary image frame is in an exposure normal state, and a second area in the auxiliary image frame is in an overexposure state; and carrying out image fusion on the original image frame and the auxiliary image frame to obtain a target image frame.
In one embodiment, the enhancement processing module, when fusing the original image frame and the auxiliary image frame to obtain the target image frame, is configured to: acquiring illumination weight information of an original image, wherein the illumination weight information is used for indicating an illumination weight corresponding to each pixel point in the original image, and the illumination weight is related to the brightness of the corresponding pixel point; and carrying out image fusion on the original image and the auxiliary image frame according to the illumination weight information to obtain a target image frame.
In one embodiment, the video processing apparatus further comprises a denoising processing module for: the method comprises the steps of carrying out denoising processing on an original image frame before an auxiliary image frame is obtained by carrying out contrast enhancement processing on the original image frame, and obtaining an updated original image frame, wherein the denoising processing is used for reducing noise of an image. And the enhancement processing module executes a step of obtaining an auxiliary image frame by performing contrast enhancement processing on the original image frame based on the updated original image frame.
In one embodiment, the video processing apparatus further comprises an edge enhancement processing module configured to: before the auxiliary image frame is obtained by performing contrast enhancement processing on the original image frame, performing edge enhancement processing on the original image frame to obtain an updated original image frame, wherein the edge enhancement processing is used for improving the definition of a contour edge in the image. And the enhancement processing module executes a step of obtaining an auxiliary image frame by performing contrast enhancement processing on the original image frame based on the updated original image frame.
In one embodiment, the video processing apparatus further comprises a super-resolution module for: after the original image frame and the auxiliary image frame are fused to obtain a target image frame, performing super-resolution processing on the target image frame, wherein the super-resolution processing is used for improving the resolution of the image.
In one embodiment, the video processing apparatus further comprises a super-frame rate module to: after a second video is generated according to the target image frame, super-frame rate processing is carried out on the second video to obtain a third video for playing, wherein the super-frame rate processing is used for improving the frame rate of the video.
< electronic device embodiment >
The present embodiments provide an electronic device that includes a memory and a processor.
The memory is used for storing executable commands.
The processor is used for executing the method described by the embodiment of the method under the control of the executable command.
< computer-readable storage Medium embodiment >
The present embodiments provide a computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, perform a method as described in method embodiments of the present invention.
The present invention may be a system, method and/or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied therewith for causing a processor to implement various aspects of the present invention.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
The computer program instructions for carrying out operations of the present invention may be assembler instructions, Instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, aspects of the present invention are implemented by personalizing an electronic circuit, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA), with state information of computer-readable program instructions, which can execute the computer-readable program instructions.
Aspects of the present invention are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. It is well known to those skilled in the art that implementation by hardware, by software, and by a combination of software and hardware are equivalent.
Having described embodiments of the present invention, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the invention is defined by the appended claims.

Claims (10)

1. A video processing method, comprising:
acquiring an original image frame in a first video;
determining a first area in the original image frame, wherein the original image frame comprises the first area and a second area, the first area in the original image frame is in an underexposure state, and the second area in the original image frame is not in the underexposure state;
performing enhancement processing on the original image frame to obtain a target image frame, wherein the enhancement processing is used for adjusting the exposure states of different areas in the image to an exposure normal state, and a first area and a second area in the target image frame are both in the exposure normal state;
and generating a second video according to the target image frame.
2. The method according to claim 1, wherein the enhancing the original image frame to obtain a target image frame comprises:
performing contrast enhancement processing on the original image frame to obtain an auxiliary image frame, wherein a first area in the auxiliary image frame is in an exposure normal state, and a second area in the auxiliary image frame is in an overexposure state;
and carrying out image fusion on the original image frame and the auxiliary image frame to obtain the target image frame.
3. The method according to claim 2, wherein the fusing the original image frame and the auxiliary image frame to obtain the target image frame comprises:
acquiring illumination weight information of the original image, wherein the illumination weight information is used for indicating an illumination weight corresponding to each pixel point in the original image, and the illumination weight is related to the brightness of the corresponding pixel point;
and carrying out image fusion on the original image and the auxiliary image frame according to the illumination weight information to obtain the target image frame.
4. The method of claim 2, wherein prior to obtaining an auxiliary image frame by performing contrast enhancement processing on the original image frame, the method further comprises:
denoising the original image frame to obtain an updated original image frame, wherein the denoising process is used for reducing the noise of the image;
and performing the contrast enhancement processing on the original image frame based on the updated original image frame to obtain an auxiliary image frame.
5. The method of claim 2, wherein before obtaining an auxiliary image frame by performing contrast enhancement processing on the original image frame, the method comprises:
performing edge enhancement processing on the original image frame to obtain an updated original image frame, wherein the edge enhancement processing is used for improving the definition of a contour edge in the image;
and performing contrast enhancement processing on the original image frame based on the updated original image frame to obtain an auxiliary image frame.
6. The method according to any one of claims 2 to 5, wherein after said fusing the original image frame and the auxiliary image frame to obtain the target image frame, the method further comprises:
and performing super-resolution processing on the target image frame, wherein the super-resolution processing is used for improving the resolution of the image.
7. The method of claim 1, further comprising, after said generating a second video from said target image frame:
and performing super-frame rate processing on the second video to obtain a third video for playing, wherein the super-frame rate processing is used for improving the frame rate of the video.
8. A video processing apparatus, comprising:
the image extraction module is used for acquiring an original image frame in a first video;
the image analysis module is used for determining a first area in the original image frame, wherein the original image frame comprises the first area and a second area, the first area in the original image frame is in an underexposure state, and the second area in the original image frame is not in the underexposure state;
the enhancement processing module is used for carrying out enhancement processing on the original image frame to obtain a target image frame, wherein the enhancement processing is used for adjusting the exposure states of different areas in the image to be in a normal exposure state, and a first area and a second area in the target image frame are both in the normal exposure state;
and the video generation module is used for generating a second video according to the target image frame.
9. An electronic device, comprising:
a memory for storing executable commands;
a processor for performing the method of any one of claims 1-7 under the control of the executable command.
10. A computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, perform the method of any of claims 1-7.
CN201911118706.7A 2019-11-15 2019-11-15 Video processing method and device and electronic equipment Pending CN112819699A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201911118706.7A CN112819699A (en) 2019-11-15 2019-11-15 Video processing method and device and electronic equipment
PCT/CN2020/127717 WO2021093718A1 (en) 2019-11-15 2020-11-10 Video processing method, video repair method, apparatus and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911118706.7A CN112819699A (en) 2019-11-15 2019-11-15 Video processing method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN112819699A true CN112819699A (en) 2021-05-18

Family

ID=75851603

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911118706.7A Pending CN112819699A (en) 2019-11-15 2019-11-15 Video processing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN112819699A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210329267A1 (en) * 2020-04-17 2021-10-21 Qualcomm Incorporated Parallelized rate-distortion optimized quantization using deep learning
CN113569630A (en) * 2021-06-16 2021-10-29 东风汽车集团股份有限公司 Electronic rearview mirror image processing method and device
CN116095509A (en) * 2021-11-05 2023-05-09 荣耀终端有限公司 Method, device, electronic equipment and storage medium for generating video frame

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103530848A (en) * 2013-09-27 2014-01-22 中国人民解放军空军工程大学 Double exposure implementation method for inhomogeneous illumination image
CN103973958A (en) * 2013-01-30 2014-08-06 阿里巴巴集团控股有限公司 Image processing method and image processing equipment
CN106169182A (en) * 2016-05-25 2016-11-30 西安邮电大学 A kind of method synthesizing several different exposure images
CN107465882A (en) * 2017-09-22 2017-12-12 维沃移动通信有限公司 A kind of image capturing method and mobile terminal
CN107492075A (en) * 2017-07-28 2017-12-19 浙江大学 A kind of method of individual LDR image exposure correction based on details enhancing
CN107800971A (en) * 2017-10-27 2018-03-13 广东欧珀移动通信有限公司 Auto-exposure control processing method, device and the equipment of pan-shot
CN108205796A (en) * 2016-12-16 2018-06-26 大唐电信科技股份有限公司 A kind of fusion method and device of more exposure images
US20180338086A1 (en) * 2017-05-16 2018-11-22 Apple Inc. Synthetic Long Exposure Image with Optional Enhancement Using a Guide Image
WO2019071613A1 (en) * 2017-10-13 2019-04-18 华为技术有限公司 Image processing method and device
CN109729279A (en) * 2018-12-20 2019-05-07 华为技术有限公司 A kind of image capturing method and terminal device
CN110087003A (en) * 2019-04-30 2019-08-02 深圳市华星光电技术有限公司 More exposure image fusion methods
CN110149550A (en) * 2018-06-19 2019-08-20 腾讯科技(深圳)有限公司 A kind of image processing method and device
CN110248107A (en) * 2019-06-13 2019-09-17 Oppo广东移动通信有限公司 Image processing method and device
CN110248105A (en) * 2018-12-10 2019-09-17 浙江大华技术股份有限公司 A kind of image processing method, video camera and computer storage medium

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103973958A (en) * 2013-01-30 2014-08-06 阿里巴巴集团控股有限公司 Image processing method and image processing equipment
CN103530848A (en) * 2013-09-27 2014-01-22 中国人民解放军空军工程大学 Double exposure implementation method for inhomogeneous illumination image
CN106169182A (en) * 2016-05-25 2016-11-30 西安邮电大学 A kind of method synthesizing several different exposure images
CN108205796A (en) * 2016-12-16 2018-06-26 大唐电信科技股份有限公司 A kind of fusion method and device of more exposure images
US20180338086A1 (en) * 2017-05-16 2018-11-22 Apple Inc. Synthetic Long Exposure Image with Optional Enhancement Using a Guide Image
CN107492075A (en) * 2017-07-28 2017-12-19 浙江大学 A kind of method of individual LDR image exposure correction based on details enhancing
CN107465882A (en) * 2017-09-22 2017-12-12 维沃移动通信有限公司 A kind of image capturing method and mobile terminal
WO2019071613A1 (en) * 2017-10-13 2019-04-18 华为技术有限公司 Image processing method and device
CN107800971A (en) * 2017-10-27 2018-03-13 广东欧珀移动通信有限公司 Auto-exposure control processing method, device and the equipment of pan-shot
CN110149550A (en) * 2018-06-19 2019-08-20 腾讯科技(深圳)有限公司 A kind of image processing method and device
CN110248105A (en) * 2018-12-10 2019-09-17 浙江大华技术股份有限公司 A kind of image processing method, video camera and computer storage medium
CN109729279A (en) * 2018-12-20 2019-05-07 华为技术有限公司 A kind of image capturing method and terminal device
CN110087003A (en) * 2019-04-30 2019-08-02 深圳市华星光电技术有限公司 More exposure image fusion methods
CN110248107A (en) * 2019-06-13 2019-09-17 Oppo广东移动通信有限公司 Image processing method and device

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
CHANG-HSING LEE: "Image contrast enhancement using classified using classified virtual exposure image fusion", 《IEEE TRANSACTIONS ON COMSUMER ELECTRONICS》, vol. 58, no. 4, 30 November 2012 (2012-11-30), pages 1253 - 1261, XP011488740, DOI: 10.1109/TCE.2012.6414993 *
SHIGUANG LIU等: "Detail-Preserving Underexposured Image Enhancement via Optimal Weighted Multi-Exposure Fusion", 《IEEE TRANSACTIONS ON CONSUMER ELECTRONICS》, vol. 65, no. 3, 31 August 2019 (2019-08-31), pages 303 - 311, XP011736120, DOI: 10.1109/TCE.2019.2893644 *
朱吉: "顾及相机抖动与运动目标的多重曝光影像融合", 《中国优秀硕士学位论文全文数据库 信息科技辑》, vol. 2019, no. 6, 15 June 2019 (2019-06-15), pages 138 - 473 *
李雪奥: "基于卷积神经网络的多曝光图像融合方法研究与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》, vol. 2019, no. 1, 15 January 2019 (2019-01-15), pages 138 - 2592 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210329267A1 (en) * 2020-04-17 2021-10-21 Qualcomm Incorporated Parallelized rate-distortion optimized quantization using deep learning
CN113569630A (en) * 2021-06-16 2021-10-29 东风汽车集团股份有限公司 Electronic rearview mirror image processing method and device
CN116095509A (en) * 2021-11-05 2023-05-09 荣耀终端有限公司 Method, device, electronic equipment and storage medium for generating video frame
CN116095509B (en) * 2021-11-05 2024-04-12 荣耀终端有限公司 Method, device, electronic equipment and storage medium for generating video frame

Similar Documents

Publication Publication Date Title
US11182877B2 (en) Techniques for controlled generation of training data for machine learning enabled image enhancement
US20210272251A1 (en) System and Method for Real-Time Tone-Mapping
Zhou et al. Lednet: Joint low-light enhancement and deblurring in the dark
KR100940148B1 (en) Method and system for modifying a digital image taking into account its noise
US11127117B2 (en) Information processing method, information processing apparatus, and recording medium
IES20060558A2 (en) Image blurring
CN112819699A (en) Video processing method and device and electronic equipment
Guthier et al. Flicker reduction in tone mapped high dynamic range video
DE102020200310A1 (en) Method and system for reducing haze for image processing
Kwon et al. Controllable image restoration for under-display camera in smartphones
CN111953893B (en) High dynamic range image generation method, terminal device and storage medium
JP5765893B2 (en) Image processing apparatus, imaging apparatus, and image processing program
WO2022066726A1 (en) Saliency based capture or image processing
JP2010232892A (en) Threshold-function control-type wavelet shrinkage noise eliminator and program
CN112153240A (en) Method and device for adjusting image quality and readable storage medium
US20220398704A1 (en) Intelligent Portrait Photography Enhancement System
WO2021093718A1 (en) Video processing method, video repair method, apparatus and device
WO2019145835A1 (en) Enhancing image data with appearance controls
CN114283101A (en) Multi-exposure image fusion unsupervised learning method and device and electronic equipment
KR20160056729A (en) Video quality enhancement device and method for extremely low-light video
EP4154171A1 (en) Systems and methods of nonlinear image intensity transformation for denoising and low-precision image processing
CN113724144A (en) Image processing method and image signal processor on terminal equipment
US11995800B2 (en) Artificial intelligence techniques for image enhancement
EP3913573B1 (en) Method for image processing, image signal processor in a terminal device
Mai et al. Patch-based HDR video processing for fast moving object reconstruction

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination