CN109660821B - Video processing method and device, electronic equipment and storage medium - Google Patents

Video processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN109660821B
CN109660821B CN201811428044.9A CN201811428044A CN109660821B CN 109660821 B CN109660821 B CN 109660821B CN 201811428044 A CN201811428044 A CN 201811428044A CN 109660821 B CN109660821 B CN 109660821B
Authority
CN
China
Prior art keywords
video
texture complexity
enhancement processing
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.)
Active
Application number
CN201811428044.9A
Other languages
Chinese (zh)
Other versions
CN109660821A (en
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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201811428044.9A priority Critical patent/CN109660821B/en
Publication of CN109660821A publication Critical patent/CN109660821A/en
Application granted granted Critical
Publication of CN109660821B publication Critical patent/CN109660821B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • 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
    • 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/443OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
    • H04N21/4431OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB characterized by the use of Application Program Interface [API] libraries
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/854Content authoring
    • H04N21/8547Content authoring involving timestamps for synchronizing content

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Library & Information Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

The application discloses a video processing method and device, electronic equipment and a storage medium, and relates to the technical field of electronic equipment. Wherein, the method comprises the following steps: dividing a video frame in a video into a plurality of video areas with different texture complexity; acquiring enhancement processing modes corresponding to the plurality of video areas respectively according to the corresponding relation between the texture complexity and the enhancement processing modes; and respectively carrying out enhancement processing on a plurality of video areas of the video frame in a corresponding enhancement processing mode, so that the video enhancement processing has differentiation, the super-definition visual effect of video display is realized, and the user experience is improved.

Description

Video processing method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of electronic device technologies, and in particular, to a video processing method and apparatus, an electronic device, and a storage medium.
Background
With the development of science and technology, electronic devices have become one of the most common electronic products in people's daily life. Moreover, users often watch videos or play games through electronic equipment, but the processing mode of the video data by the electronic equipment is fixed at present, so that the processing effect is not ideal, and the user experience is not good.
Disclosure of Invention
In view of the foregoing, the present application provides a video processing method, an apparatus, an electronic device and a storage medium to improve the foregoing problems.
In a first aspect, an embodiment of the present application provides a video processing method, where the method includes: dividing a video frame in a video into a plurality of video areas with different texture complexity; acquiring enhancement processing modes corresponding to the plurality of video areas respectively according to the corresponding relation between the texture complexity and the enhancement processing modes; and respectively carrying out enhancement processing on a plurality of video areas of the video frame in a corresponding enhancement processing mode, wherein the enhancement processing improves the image quality of the video frame by adjusting the image parameters of the video frame.
In a second aspect, an embodiment of the present application provides a video processing apparatus, including: the region dividing module is used for dividing a video frame in a video into a plurality of video regions with different texture complexity; the mode acquisition module is used for acquiring the enhancement processing modes corresponding to the video areas respectively according to the corresponding relation between the texture complexity and the enhancement processing modes; and the processing module is used for respectively carrying out enhancement processing on a plurality of video areas of the video frame in a corresponding enhancement processing mode, and the enhancement processing improves the image quality of the video frame by adjusting the image parameters of the video frame.
In a third aspect, an embodiment of the present application provides an electronic device, including: one or more processors; a memory; one or more programs. Wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the methods described above.
In a fourth aspect, the present application provides a computer-readable storage medium, in which a program code is stored, and the program code can be called by a processor to execute the above method.
According to the video processing method, the video processing device, the electronic equipment and the storage medium, the video frame is divided into the plurality of video areas, the corresponding enhancement processing mode is determined according to the texture complexity of each video area, so that the video enhancement processing has differentiation, the characteristics of the video are better met, a better video enhancement effect is obtained, the super-definition effect of video display is realized, and the user experience is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 shows a schematic flow chart of video playing provided by an embodiment of the present application.
Fig. 2 shows a flowchart of a video processing method according to an embodiment of the present application.
Fig. 3 shows a flowchart of a video processing method according to another embodiment of the present application.
Fig. 4 shows a schematic diagram of region division provided in an embodiment of the present application.
Fig. 5 is a schematic diagram illustrating another area division provided in an embodiment of the present application.
Fig. 6 is a schematic diagram illustrating still another area division provided in the embodiment of the present application.
Fig. 7 is a schematic diagram illustrating still another area division provided in an embodiment of the present application.
Fig. 8 is a flowchart illustrating a part of the steps of a video processing method provided by an embodiment of the present application.
Fig. 9 shows a schematic diagram of still another region division provided in an embodiment of the present application.
Fig. 10 shows a schematic diagram of a region synthesis provided in an embodiment of the present application.
Fig. 11 shows a schematic diagram of another region synthesis provided in the embodiments of the present application.
Fig. 12 is a schematic diagram illustrating a correspondence table according to an embodiment of the present application.
Fig. 13 is a schematic diagram illustrating another correspondence table provided in the embodiment of the present application.
Fig. 14A to 14C are schematic views each showing an image obtained by dividing each video region in fig. 10.
Fig. 15 is a flowchart illustrating a video processing method according to another embodiment of the present application.
Fig. 16 is a functional block diagram of a video processing apparatus according to an embodiment of the present application.
Fig. 17 shows a block diagram of an electronic device according to an embodiment of the present application.
Fig. 18 is a storage unit for storing or carrying program codes for implementing a video processing method according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
Referring to fig. 1, fig. 1 shows a video playing process. Specifically, when the operating system acquires data to be played, the next task is to analyze audio/video data. The general video file is composed of a video stream and an audio stream, and the audio and video packaging formats of different video formats are different. The process of combining audio and video streams into a file is called muxer, whereas the process of separating audio and video streams from a media file is called demux. Playing the video file requires separating the audio stream and the video stream from the file stream, decoding the audio stream and the video stream respectively, directly rendering the decoded video frame, sending the corresponding audio to the buffer area of the audio output device for playing, and certainly, controlling the timestamps of video rendering and audio playing synchronously. And each video frame is an image of each frame corresponding to the video.
Specifically, the video decoding may include hard decoding and soft decoding, where the hardware decoding is performed by submitting a part of video data, which is originally completely processed by a Central Processing Unit (CPU), to a Graphics Processing Unit (GPU), and the GPU has a parallel operation capability much higher than that of the CPU, so that a load on the CPU can be greatly reduced, and some other programs can be run simultaneously after the CPU occupancy rate is reduced, and certainly, for a better processor, such as i 52320 or any type of AMD four-core processor, both hard decoding and soft decoding can be performed.
Specifically, as shown in fig. 1, a multimedia Framework (Media Framework) acquires a Video file to be played by a client through an API interface with the client, and delivers the Video file to a Video codec (Video decoder). The Media Framework is a multimedia Framework in an Android system, and three parts, namely MediaPlayer, mediaplayservice and stagefrigemployer, form a basic Framework of the Android multimedia. The multimedia frame part adopts a C/S structure, the MediaPlayer is used as a Client terminal of the C/S structure, the mediaplayservice and the stagefrigtheyer are used as a C/S structure Server terminal, the responsibility of playing the multimedia file is born, and the Server terminal completes the request of the Client terminal and responds through the stagefrigtheyer. The Video decoder is a super decoder that integrates the most common audio and Video decoding and playback for decoding Video data.
In the soft decoding, the CPU decodes the video through software. And hard decoding means that the video decoding task is independently completed through a special daughter card device without the aid of a CPU.
Whether hard decoding or soft decoding is performed, after the video data is decoded, the decoded video data is sent to a layer delivery module (surface flunger), and as shown in fig. 1, the hard decoded video data is sent to the surface flunger through a video driver. The surfaceflag displays the decoded video data on a display screen after rendering and synthesizing the video data. The Surface flunger is an independent Service, receives all the Surface of windows as input, calculates the position of each Surface in a final composite image according to parameters such as ZOrder, transparency, size and position, and then sends the position to HWComposer or OpenGL to generate a final display Buffer, and then displays the final display Buffer on a specific display device.
As shown in fig. 1, in the soft decoding, the CPU decodes the video data and then gives it to the surface flag rendering and compositing, and in the hard decoding, the CPU decodes the video data and then gives it to the surface flag rendering and compositing. And the SurfaceFlinger calls the GPU to render and synthesize the image, and the image is displayed on the display screen.
In order to obtain a good display effect, before the video is rendered and synthesized for display, the video enhancement can be performed, so that the image quality of the video frame of the video is improved by adjusting the image parameters of the video, the display effect of the video is improved, and a better viewing experience is obtained. The image quality of the video can comprise parameters such as definition, sharpness, saturation, details, lens distortion, color, resolution, color gamut range and purity, the image is more suitable for the watching preference of human eyes by adjusting various parameters in the image quality, and the watching experience of a user is better. For example, the higher the definition of the video, the smaller the noise, the clearer the details, the higher the saturation, and the like, the better the image quality of the video is represented, and the better the user viewing experience is. The adjustment of parameters of different combinations in the image quality represents different enhancement processing modes of the video.
When the video frame is enhanced to obtain better image quality, the electronic equipment adopts the same processing mode for the same frame of the video, namely, a processing mode is adopted to process each pixel point of the video frame, and the processing modes of different positions in the video frame are consistent.
The inventor has found through research that images of different areas in the same video frame may have different characteristics. Because the human eye perception system has different sensitivities to areas with different characteristics in a frame of picture, the areas with different characteristics can achieve better video display effect by adopting different targeted enhancement processing modes.
Wherein texture is one of the characteristics of the image. Texture is a visual feature that reflects the phenomenon of homogeneity in images, and it embodies the slowly or periodically changing surface structure organization arrangement property of the object surface, and is expressed by the gray distribution of pixels and their surrounding spatial neighborhoods. For example, the linear texture such as the pattern or line on the surface of the object in the image is a texture image. Generally, the more complex the texture of an image, the more detailed features.
In a video frame, a region with low texture complexity, such as a region corresponding to the sky, a region corresponding to the calm sea, etc., generally has severe mosaic and blocking effect due to the quantization of an encoder; and for the areas with higher texture complexity, such as the corresponding areas of piled leaves, grass and carpets, the details are more. Therefore, for areas with different texture complexity in the video frame, a corresponding enhancement processing mode can be adopted to reduce the fast effect of the area with lower texture complexity and enhance the details of the area with higher texture complexity. Therefore, the video processing method, the video processing device, the electronic device and the storage medium in the embodiments of the application are provided, and are used for performing enhancement processing according to different resolutions of videos.
The following describes in detail a video processing method, an apparatus, an electronic device, and a storage medium provided in embodiments of the present application with specific embodiments.
Referring to fig. 2, a video processing method according to an embodiment of the present application is shown. The video processing method is used for dividing the video frame into areas with different texture complexity, selecting a proper enhancement processing mode for different areas according to the texture complexity, specifically selecting the enhancement processing mode capable of improving the image quality of the video area corresponding to the texture complexity in a targeted manner, so as to improve the enhancement processing effect of the video and obtain the super-definition visual effect of video display. In a specific embodiment, the video processing method is applied to the video processing apparatus 400 shown in fig. 16 and the electronic device 500 (fig. 17) equipped with the video processing apparatus 400. The following will describe a specific flow of this embodiment by taking an electronic device as an example, and it should be understood that the electronic device applied in this embodiment may be various devices capable of performing video processing, such as a smart phone, a tablet computer, a desktop computer, a wearable electronic device, a vehicle-mounted device, and a gateway, and is not limited specifically herein. Specifically, the method comprises the following steps:
step S110: a video frame in a video is divided into a plurality of video areas with different texture complexity.
In the embodiment of the present application, the video is a still image captured, recorded, processed, stored, and transmitted by an electrical signal, and is reproduced in the electronic device as a series of image frames, wherein each image frame is a video frame. According to the principle of persistence of vision, human eyes cannot distinguish a single static picture, and each video frame in a video looks like a smooth continuous visual effect. That is to say, the video in the embodiment of the present application includes, in addition to the video played by the video playing software, a game or other continuous image set formed by smooth and continuous video frames.
The electronic device may obtain video data of a video from a server, may obtain the video data locally, or may obtain the video data from other electronic devices.
Specifically, when the video data is obtained by the electronic device from the server, then the video data may be downloaded by the electronic device from the server, or obtained online by the electronic device from the server. For example, the video data may be downloaded by the electronic device through installed video playing software, or obtained online by the video playing software. The server may be a cloud server. When the video data is acquired from the local of the electronic device, the video data may be previously downloaded by the electronic device and stored in the local memory. When the video data is acquired by the electronic device from another electronic device, the video data may be transmitted to the electronic device by the other electronic device through a wireless communication protocol, for example, a WLAN protocol, a bluetooth protocol, a ZigBee protocol, a WiFi protocol, or the like, or may be transmitted to the electronic device by the other electronic device through a data network, for example, a 2G network, a 3G network, or a 4G network, and the like, which is not limited herein.
The electronic equipment acquires video data, and plays the video data through the display after the video data is decoded, rendered, synthesized and the like. And if a related control instruction for performing enhancement processing on the video is received, performing enhancement processing on the video data, and playing the video after the enhancement processing. When a control instruction of enhancement processing is received, the electronic device may perform region division on a video frame in the video according to the texture complexity so as to obtain an enhancement processing mode. That is, the video frame for the electronic device to perform video area division is a video frame for performing enhancement processing before playing.
As an embodiment, the control instruction of the enhancement processing may be generated by the electronic device when the video is turned on. For example, if the default setting of the application program playing the video is to start video enhancement, a control instruction for enhancement processing is generated when the video is started. For another example, if the control instruction of the enhancement processing is started when the application program playing the video is closed last time, the control instruction of the enhancement processing is started while the application program is opened again. Or the control instruction for enhancing processing is started when the video is closed last time, and the control instruction for enhancing processing is generated when the video is opened again.
As an embodiment, the control instruction of the enhancement processing may also be a user trigger received during the video playing process. For example, a control switch for video enhancement is provided. If the switch is in the closed state, the switch is switched to the open state after receiving the trigger of the user, and meanwhile, the control instruction of the enhancement processing is judged to be received. In the video playing process, the set video enhancement control switch can be in a hidden state. And when touch control such as clicking of the video is received, displaying the control switch and enabling the control switch to be in a triggerable state. And when the video does not receive the touch operation of the user for a period of time, hiding the control switch again.
Step S120: and acquiring the enhancement processing modes respectively corresponding to the plurality of video areas according to the corresponding relation between the texture complexity and the enhancement processing modes.
The various texture complexities have corresponding enhancement processing modes, and the enhancement processing mode corresponding to each texture complexity carries out enhancement processing for improving the image quality according to the characteristics of the texture complexity. Specifically, each enhancement processing mode corresponding to the texture complexity may be implemented by removing or weakening the factor that generally reduces the image quality of the image with the texture complexity; or the image quality is improved by strengthening some inherent characteristics of the image with the texture complexity. For example, for a video region with low texture complexity, the fast effect is more, and the corresponding enhancement processing mode emphasizes that the image quality is enhanced by removing the fast effect; for a video region with higher texture complexity, the details are richer, and the corresponding enhancement processing mode emphasizes enhancement by detail removal to enhance the image quality.
Step S130: and respectively carrying out enhancement processing on a plurality of video areas of the video frame in a corresponding enhancement processing mode, wherein the enhancement processing improves the image quality of the video frame by adjusting the image parameters of the video frame.
And performing enhancement processing on each divided video area in the video frame in a corresponding enhancement processing mode. The video enhancement processing is to improve the image quality of the video frame by adjusting the image parameters of the video, that is, adjust the image parameters of each video area in the video frame by a corresponding enhancement processing mode, so that the image quality of the video frame is better, the overall display effect of the video is better, and the video watching experience of a user is improved.
According to the video processing method provided by the embodiment of the application, the video frame is divided into the plurality of different video areas, the enhancement processing mode corresponding to the texture complexity of each video area is obtained, each video area is enhanced through the corresponding enhancement processing mode, and the characteristics of each video area in the video frame are processed, so that the processing of each video area in the video frame is different, a good processing effect is obtained, and the super-definition effect is realized.
Another embodiment of the present application provides a video processing method, which specifically includes a manner of dividing video regions of a video frame. Specifically, as shown in fig. 3, the method includes:
step S210: the video frame is divided into a plurality of regions.
Because the texture features of an image are not based on the characteristics of the pixel points, it requires statistical calculation in a region containing a plurality of pixel points. Therefore, when a video frame in a video is divided into a plurality of video areas with different texture complexity, the video frame can be firstly divided into a plurality of areas, and statistical calculation is performed in each area to obtain the texture complexity in each area. The manner of dividing the video frame into a plurality of regions is not limited in the embodiment of the present application.
As an embodiment, the regular region division manner may be preset and stored. For example, the video frame may be divided into a preset number of regions having the same shape. As shown by the dotted line division in fig. 4, the video frame is divided into 9 rectangular areas in the form of a squared figure; or as shown by the dotted line division in fig. 5, the video frame is divided into 4 triangular regions by diagonal line division; or as shown by the dashed line division in fig. 6, the video frame is divided in the middle of the horizontal direction and the vertical direction, and the video frame is divided into 4 rectangular regions, and the like. Of course, the shapes of the respective regions to be divided in the present embodiment may be different, and the number and the shapes of the divisions are not limited in the embodiment of the present application.
As an embodiment, a region division method of random division may be set and stored in advance. For example, a specific number of regions, i.e., the number of regions into which a video frame is to be divided, may be set. In area division of a video frame, a set number of areas may be randomly divided.
In one embodiment, for the same object in the video frame, the texture complexity of the image corresponding to the object in each region is usually small, so that the region division can be performed on the video frame by taking the object as a standard. That is, one object is divided into one area, and the one area includes only the same object as much as possible. For example, as shown in fig. 7, a building a in the video frame is an object and can be divided into an area a; the white cloud B is an object and can be divided into an area B; the white cloud C is an object and can be divided into an area C; the remaining other location is a region D.
In this embodiment, as shown in fig. 8, the specific division manner may include:
step S221: and identifying a target object of the video frame through a neural network.
The neural network can be trained by various objects, such as sky, buildings, white clouds, automobiles, grasslands, woodlands, human figures and the like, and the object for training the neural network is a target object which can be identified by the neural network. Therefore, by recognizing the video frame through the trained neural network, various target objects in the video frame, such as a building a, a white cloud b, and a white cloud c in fig. 7, can be recognized through the neural network.
In the embodiment of the present application, the specific Neural network used is not limited, and may be, for example, a full convolution Neural network fcn (full volumetric Neural networks) or a Neural network such as cnn (volumetric Neural network). The FCN can perform pixel-level segmentation on objects in the preview picture, and the CNN segmentation effect and universality are good. In addition, the method can also be a mobile visual neural network (MobileNet), the mobile visual neural network is a light convolutional neural network, the redundant expression of a convolutional kernel can be effectively reduced while the learning capability is good, the processing speed is high, and the processing of real-time pictures can be effectively dealt with.
Step S222: the video frame is divided into a region including a target object and a region not including the target object.
And carrying out region division on the video frame according to the identified target object. Specifically, the division may be made into a region including each target object and a region not including the target object, respectively. The regions respectively including the target objects are divided into one region, and one region includes one target object. As shown in fig. 7, the target object building a, the white cloud B, and the white cloud C are respectively divided into an area a, an area B, and an area C, and the video frame includes an area D without the target object.
Optionally, if there are target objects adjacent to or overlapping with each other in the video frame, the respective divided regions may be adjacent non-overlapping regions for adjacent or overlapping target objects, in this case, one target object corresponds to one region, one region includes one target object, and the target object is included in the corresponding region as much as possible, but a part of the target object adjacent to other target objects may not be included in the corresponding region. For example, the white clouds B and C shown in fig. 9 overlap each other, and are respectively adjacent to the divided regions B and C, and the overlapping portion of the white clouds B and C is not included in the region B.
Step S220: the texture complexity of each region is calculated.
The texture complexity is calculated for each region. The way of calculating the texture complexity is not limited in the embodiment of the present application. Alternatively, the texture may be analyzed by statistical methods based on the gray attributes of the pixels and their neighborhoods, such as by a gray level co-occurrence matrix (GLCM) texture analysis method; the geometric method of a texture feature analysis method based on the texture primitive theory, such as Voronio checkerboard feature method; model methods that can estimate computational model parameters from the realization of texture images, such as Markov Random Field (MRF) model methods, Gibbs random field model methods, fractal models, autoregressive models, and other random field model methods; the method can be used for processing signals on the basis of time domain, frequency domain analysis and multi-scale analysis, such as Tamura texture features, autoregressive texture models, wavelet transformation and the like; the texture may be analyzed by a structural analysis method that emphasizes the regularity of the texture, such as a syntactic texture description algorithm, a mathematical morphology method, and the like.
The embodiment of the present application exemplifies the representation of texture complexity by gradient. The gradient of the image is derived from the pixels therein, and Grad (x, y) ═ dx (i, j) + dy (i, j), dx (i, j) ═ p (i, j) -p (i-1, j), and dy (i, j) ═ p (i, j) -p (i, j-1). Wherein (i, j) represents a pixel point with a row i and a column j in the region, and p (i, j) represents a pixel value of the pixel point (i, j). For a region, the gradient value of the region is calculated
Figure BDA0001882075650000091
Where W represents the width of the video area and H represents the height of the video area. The larger the gradient value, the higher the texture complexity of the region.
Step S230: and merging the adjacent areas with the texture complexity meeting the preset similarity to obtain a plurality of video areas with different texture complexities.
In the video frame, each divided region may have similar texture complexity of adjacent regions. Images with similar texture complexity may be processed by the same enhancement processing method, if their features are similar. Therefore, areas with similar texture complexity in the video frames can be merged to reduce the number of video areas for enhancement processing.
In the embodiment of the present application, the neighboring areas with similar texture complexity are merged, which may be the neighboring areas with the texture complexity satisfying the preset similarity.
As an embodiment, the difference of the texture complexity between the adjacent regions may be calculated, and the adjacent regions with the texture complexity difference smaller than the preset threshold may be merged.
As an embodiment, a texture complexity range in which region merging is possible may also be set. When the region combination is carried out, adjacent regions with the texture complexity within the same texture complexity range are combined. For example, l represents the complexity of texture, a region in which the complexity of texture is set in the range of [ l1-l2) may be merged into one region, and a region in which the complexity of texture is set in the range of [ l2-l3) may be merged into one region. Then if the texture complexity of two neighboring regions is in the range of [ l1-l2), the two regions can be merged into one region.
In the embodiment of the present application, the adjacent areas to be merged may be two areas, or may be three areas, or there may be an area that is not merged with another area.
Each region obtained after merging is a plurality of video regions with different texture complexity in the embodiment of the present application. The merged region may be a regular video region, and as shown in fig. 10, the region B and the region C are merged into the region BC, and the video regions obtained in fig. 9 are respectively the region a, the region BC and the region D shown in fig. 10. The merged region may be an irregular video region, and as shown in fig. 11, the region B and the region C are merged into a region BC. In the embodiments of the present application, the regular regions are mainly used as examples for description.
In the embodiment of the present application, step S230 may be an optional step. That is, in step S230, neighboring areas of the video frame whose texture complexity satisfies the preset similarity are merged to obtain a plurality of video areas with different texture complexities; the plurality of areas divided in step S210 may be different video areas.
In the embodiment of the application, the division of the plurality of video areas can be performed by combining with a GPU, a set of division rules obtained through statistics is operated on the GPU, and different image quality enhancement algorithms are corresponding to different division rule areas.
Step S240: and acquiring the enhancement processing modes respectively corresponding to the plurality of video areas according to the corresponding relation between the texture complexity and the enhancement processing modes.
Corresponding enhancement processing modes can be set corresponding to the texture complexity, enhancement processing corresponding to the enhancement processing modes is carried out, and image quality improvement corresponding to the enhancement processing modes is obtained. The correspondence between the texture complexity and the enhancement processing method may be preset and stored, and the processing of the enhancement processing method corresponding to each texture complexity is a factor of reducing the image quality that needs to be removed from the image with the texture complexity or a factor of improving the image quality that needs to be enhanced. Wherein, each enhancement processing mode comprises one or more image processing algorithms to realize corresponding processing effects. For example, an enhanced processing mode for removing the blocking artifacts is required, including an image processing algorithm for removing the blocking artifacts, such as a loop deblocking filtering algorithm; the enhancement processing methods that need to enhance details and increase saturation include image processing algorithms for enhancing details and image processing algorithms for increasing saturation, such as performing detail enhancement through a multi-scale image-based detail enhancement algorithm, a histogram equalization method, and the like, and enhancing saturation through increasing each color channel of RGB.
Since the block effect is more serious in the video region with low texture complexity, and the details of the video region with high texture complexity are more, for example, in fig. 10, the texture complexity of the video region a is higher than that of the video region BC, the texture complexity of the video region BC is higher than that of the video region D, the details of the video region a are more than that of the video region BC, and the details of the video region BC are more than that of the video region D. Therefore, the detail of the video area with high texture complexity can be enhanced, and the blocking effect can be removed from the video area with low texture complexity. For example, the plurality of video regions includes a first video region and a second video region, the texture complexity of the first video region being greater than the second video region. Obtaining the enhancement processing modes corresponding to the plurality of video regions respectively according to the correspondence between the texture complexity and the enhancement processing modes may include: acquiring an enhancement processing mode for removing the blocking effect of the first video area according to the corresponding relation between the texture complexity and the enhancement processing mode; and acquiring an enhancement processing mode for enhancing the details of the second video area according to the corresponding relation between the texture complexity and the enhancement processing mode.
The video region in the video frame may include a plurality of regions, and the lower the texture complexity, the stronger the image processing algorithm for removing the blocking effect is included in the corresponding enhancement processing mode; the higher the texture complexity, the corresponding enhancement processing includes stronger detail-enhanced image processing algorithms. Along with the complexity of the texture from low to high, the effect of removing the blocking effect in the corresponding enhancement processing mode is gradually weakened, and the effect of enhancing the details is gradually increased.
In addition, for a video region with low texture complexity, the corresponding enhancement processing mode can include an image processing algorithm for increasing contrast and enhancing saturation, an image processing algorithm for eliminating or weakening detail enhancement and weakening brightness, and the like, besides an image processing algorithm for removing blocking effect. For a video region with high texture complexity, the corresponding enhancement processing mode may further include sharpening, increasing contrast, saturation, and image processing algorithms for weakening or removing demosaicing and deblocking effects.
In the embodiment of the present application, the correspondence between the texture complexity and the enhancement processing mode may be represented by a correspondence table. The correspondence table may be downloaded simultaneously when the electronic device downloads the video application program, downloaded when the video enhancement plug-in is downloaded, downloaded or updated when a system of the electronic device is updated, pushed to the electronic device when a server has a new correspondence table, or obtained by the electronic device at regular time from a server request, or obtained by the electronic device from the server when the correspondence table needs to be used, if an enhancement processing mode corresponding to the texture complexity needs to be searched through the correspondence table. How and when the correspondence table is obtained is not limited in the embodiment of the present application.
The corresponding relation table includes the corresponding relation between the texture complexity and the enhancement processing mode. Optionally, according to characteristics of images with different texture complexities, in the correspondence table, the correspondence between the texture complexity and the enhancement processing mode may be that the lower the texture complexity, the more the enhancement processing mode is biased to remove the blocking effect, increase the contrast and enhance the saturation, and eliminate or weaken the detail enhancement and weaken the brightness, the enhancement processing mode may include an image processing algorithm for removing the blocking effect, and may further include one or more of image processing algorithms for increasing the contrast and enhance the saturation, eliminating or weakening the detail enhancement and weakening the brightness. The higher the texture complexity is, the more the enhancement processing mode is biased toward detail enhancement, sharpening, contrast increase, saturation increase, weakening or removing demosaicing and deblocking effects, which may include image processing calculation of detail enhancement, and may also include one or more algorithms corresponding to sharpening, contrast increase, saturation increase, weakening or removing demosaicing and deblocking effects.
For example, the correspondence table may be a texture complexity lower than a specified texture complexity, and the corresponding enhancement processing manner includes an image processing algorithm for removing blocking artifacts, and one or more corresponding image processing algorithms for increasing contrast and saturation, eliminating or weakening detail enhancement, weakening brightness, and the like. In addition, in the corresponding relation table, the texture complexity lower than the specified texture complexity gradually enhances the processing effect according to the complexity from high to low, such as stronger blocking effect removal, weaker detail enhancement and the like.
In the correspondence table, the texture complexity may be higher than the specified texture complexity, and the corresponding enhancement processing manner includes detail enhancement, and further includes one or more of sharpening, increasing contrast, increasing saturation, weakening or removing demosaicing and deblocking. Specifically, in the correspondence table, the texture complexity higher than the specified texture complexity gradually increases according to the complexity from low to high, and if the detail enhancement effect is better, the blocking effect removal is weaker.
In this embodiment of the present application, the enhancement processing manner corresponding to the texture complexity of each video region can be obtained from the correspondence table, so as to obtain the enhancement processing manner corresponding to each video region. The enhancement processing of the enhancement processing modes corresponding to various texture complexities in the corresponding relation table is an enhancement processing mode for performing targeted image quality improvement on the image with the texture complexities.
As an embodiment, the correspondence table may include a correspondence between a specific value of the texture complexity and the enhancement processing method. In this embodiment, when obtaining the enhancement processing modes corresponding to the texture complexity of each video region, the enhancement processing modes corresponding to the texture complexity which is the same as the texture complexity of each video region in the correspondence table may be sequentially searched for as the enhancement processing modes corresponding to the obtained texture complexity.
In this embodiment, if the texture complexity of a certain video region does not have the same texture complexity in the correspondence table, the enhancement processing method corresponding to the texture complexity closest to the texture complexity of the video region in the correspondence table can be searched for as the enhancement processing method corresponding to the video region.
Taking the correspondence table shown in fig. 12 as an example, the texture complexities L1, L2, and L3 correspond to enhancement processing methods L1, L2, and L3, respectively. When the enhancement processing mode corresponding to each video area in the video frame shown in fig. 10 is obtained, the enhancement processing mode is searched in the corresponding relationship table according to the texture complexity of each video area. For example, if the texture complexity of the video area a is closest to L1 in the table, i.e. the difference between the texture complexity of the video area a and L1 is smaller than the difference between L2 and L3, the enhancement mode L1 is used as the enhancement mode for the video area a. If the texture complexity of the video region D is closest to L2 in the correspondence table, the enhancement mode L2 is set as the enhancement mode corresponding to the video region D.
Optionally, the correspondence table may include a correspondence between a range interval of the texture complexity and the enhancement processing mode. That is, the range sections with different texture complexity correspond to different enhancement processing methods. In this embodiment, when obtaining the enhancement processing method corresponding to the texture complexity of each video region, it may sequentially search whether the texture complexity of each video region is within a certain range section in the correspondence table, and if so, take the enhancement processing method corresponding to the range section as the enhancement processing method corresponding to the video region.
Taking the correspondence table shown in fig. 13 as an example, the texture complexities [ L1-L2), [ L2-L3), and [ L3-L4) correspond to enhancement processing modes L1, L2, and L3, respectively. When the enhancement processing mode corresponding to each video area in the video frame shown in fig. 10 is obtained, the enhancement processing mode is searched in the corresponding relationship table according to the texture complexity of each video area. If the texture complexity of the video area a is in the range of [ L1-L2), the enhancement mode L1 is set as the enhancement mode of the video area a. If the texture complexity of the video region D is in the range of [ L2-L3), the enhancement mode L2 is set as the enhancement mode corresponding to the video region D.
In the embodiment of the present application, for different video regions, the obtained enhancement processing modes may be the same or different according to the texture complexity. For example, if the texture complexity of two video regions corresponds to the same enhancement processing method in the correspondence table, the enhancement processing methods corresponding to the two video regions are the same.
Step S250: and respectively carrying out enhancement processing on a plurality of video areas of the video frame in a corresponding enhancement processing mode, wherein the enhancement processing improves the image quality of the video frame by adjusting the image parameters of the video frame.
And performing enhancement processing on each video area in the video frame in a corresponding enhancement processing mode. Specifically, the video frame may be divided into a plurality of video regions by image division. After division, each video region is used as an independent image, and enhancement processing can be performed on the divided video regions in a corresponding enhancement processing mode. After the plurality of video areas are processed respectively, the processed images of the plurality of video areas can be synthesized into a video frame for display. It is understood that the video frame obtained after the synthesis is a video frame subjected to enhancement processing on the divided video frame. After the composition, the position of each video region in the composed video frame is the same as the position in the divided video frame.
For example, by dividing the video frame shown in fig. 10, an independent image AG corresponding to the video area a shown in fig. 14A, an independent image BCG corresponding to the video area BC shown in fig. 14B, and an independent image DG corresponding to the video area D shown in fig. 14C can be obtained. Wherein for irregularly shaped video regions, such as video region D, portions other than the video region can be complemented by pixels of default pixels, such as pixels of pixels that are all gray as shown in fig. 14C. And then respectively carrying out enhancement processing on each independent image, namely carrying out enhancement processing on the independent image AG by an enhancement processing mode corresponding to the video area A, carrying out enhancement processing on the independent image BCG by an enhancement processing mode corresponding to the video area BC, and carrying out enhancement processing on the independent image DG by an enhancement processing mode corresponding to the video area D. After the enhancement processing, the independent images AG, BCG and DG are combined into a video frame, and the position of each video area in the combined video frame is unchanged from that of the video frame before the division, that is, the part corresponding to the video area a in the independent image AG is at the position of the video area a, the part corresponding to the video area BC in the independent image BCG is at the position of the video area BC, and the part corresponding to the video area D in the independent image DG is at the position of the video area D.
In the embodiment of the present application, in order to increase the processing speed, a plurality of video areas can be processed simultaneously.
In the embodiment of the application, a video frame is divided into a plurality of areas, a plurality of video areas with different texture complexity are obtained according to the texture complexity of the areas, and a corresponding enhancement processing mode is obtained according to the texture complexity of each video area, so that the video areas with different characteristics in the video frame can be processed in a targeted manner, the processing of different video areas in the video frame is more differentiated, and a good video enhancement effect is obtained.
An embodiment of the present application provides a video processing method, which determines a severity of a blocking effect in a video frame according to a resolution of a video, so as to determine whether to perform enhancement processing on the video frame with low texture complexity. Specifically, referring to fig. 15, the method may include:
step S310: dividing a video frame in a video into a plurality of video areas with different texture complexity;
step S320: and acquiring the resolution of the video.
For videos with different resolutions, the display effect of the videos is different when the videos are displayed by the electronic equipment. For low-resolution video, the video is noisy and the display is blurred. Specifically, the video with low resolution has fewer effective pixels, the distance between the effective pixels is enlarged during enlargement, the electronic device fills the space between the effective pixels by interpolation, and the pixels used for interpolation are calculated according to the upper, lower, left and right effective pixels and are not real video information, so that the displayed video image has more information which is not the video itself, and the video has larger noise. Particularly, corresponding to the edge of the image in the video frame, the interpolation pixel obtained by calculation causes the edge to generate a pixel block, such as mosaic, i.e. block effect, so that the edge is blurred and not clear enough, and edge noise is formed.
And for a high-resolution video, the effective pixels are more, when the display screen of the electronic equipment displays, more image information of the video is displayed, the video is clear, and the noise is lower.
Therefore, the resolution of the video can be acquired, and the corresponding processing mode can be determined according to the characteristics of the video frames with different resolutions.
Specifically, the resolution of the video is a parameter for measuring the amount of data in the video frame, and can be represented by w × h, where w refers to an effective pixel in the horizontal direction of the video frame, and h refers to an effective pixel in the vertical direction of the video frame.
The manner of obtaining the resolution of the video may be that the electronic device decodes the video, and in the decoded video data, there is a data portion corresponding to the stored resolution, and the data portion may be a piece of data. Therefore, the data portion corresponding to the resolution can be acquired from the decoded data of the video, and the resolution of the video can be acquired from the data portion corresponding to the resolution.
For example, H.264, also part tenth of MPEG-4, is a highly compressed digital Video codec standard proposed by the Joint Video Team (JVT, Joint Video Team) consisting of the union of the ITU-T Video Coding Experts Group (VCEG) and the ISO/IEC Moving Picture Experts Group (MPEG). For the code stream coded by h.264, the stream information of the code stream includes the resolution of the video, and the stream information of the code stream is stored in a special structure called SPS (sequence Parameter set), which is the data portion corresponding to the resolution in the decoded data. According to the format information of the h.264 code stream, in the h.264 code stream, 0x 000 x01 or 0x 000 x 000 x01 is used as the start code, so whether the start code is SPS is judged by detecting whether the last five bits of the first byte after the start code are 7 (00111). After the SPS is obtained, the resolution of the video may be resolved. There are two members in the SPS, pic _ width _ in _ mbs _ minus1 and pic _ height _ in _ map _ units _ minus _1, which represent the width and height of the picture, respectively, and are both reduced by 1 in units of 16 (in units of 16 × 16 blocks in area), so the actual width is (pic _ width _ in _ mbs _ minus1+1) × 16, and the height is (pic _ height _ in _ map _ units _ minus _1+1) × 16, i.e., (pic _ width _ in _ mbs _ minus1+1) ("w" in the resolution, and (pic _ height _ in _ map _ units _ minus _1+1) ("h" in the resolution).
Step S330: and judging whether the resolution is larger than a preset resolution threshold value or not. If not, go to step S340; if yes, go to step S350.
The preset resolution threshold is a preset resolution value, and the specific setting basis can be that the definition of the video frame corresponding to the resolution higher than the preset resolution threshold is higher, the noise is low, and the blocking effect is less. And judging whether the resolution of the video is greater than a preset resolution or not.
Step S340: and acquiring the enhancement processing modes respectively corresponding to the plurality of video areas according to the corresponding relation between the texture complexity and the enhancement processing modes.
If the resolution of the video is lower than the preset resolution, higher noise exists in the video frame, and the blocking effect is generally more serious, so that corresponding enhancement processing is performed on each video area with different texture complexity, and the enhancement processing modes corresponding to the multiple video areas are obtained.
In this embodiment of the application, for example, the specific acquisition enhancement processing manner may be that the plurality of video regions include a first video region and a second video region, and the texture complexity of the first video region is greater than that of the second video region. And acquiring an enhancement processing mode for removing the blocking effect of the first video area according to the corresponding relation between the texture complexity and the enhancement processing mode, and acquiring an enhancement processing mode for enhancing the details of the second video area according to the corresponding relation between the texture complexity and the enhancement processing mode.
For the method in the embodiment of the present application, specific obtaining enhancement processing manners may refer to the foregoing embodiments, and are not described herein again.
Step S350: and acquiring an enhancement processing mode corresponding to the video area with the texture complexity larger than a preset texture complexity threshold value in the plurality of video areas.
For a video with high resolution, since the video is clear, the noise is low, and the blocking artifacts are less, the blocking artifacts are less in a video area with low texture complexity, so that the blocking artifacts can be removed without processing the video area with the texture complexity. Specifically, video areas with texture complexity greater than a preset texture complexity threshold among the multiple video areas may be obtained, and an enhancement processing manner corresponding to the video area with texture complexity greater than the preset texture complexity threshold may be obtained, where the enhancement processing manner corresponding to the video area with texture complexity greater than the preset texture complexity threshold may include an image processing algorithm for detail enhancement, and may further include one or more image processing algorithms of sharpening, increasing contrast, increasing saturation, weakening, or removing mosaic and block effects. The specific value of the preset texture complexity threshold is not limited in the embodiment of the application, and may be higher than the preset texture complexity threshold, the details of the image are richer, and the image quality of the image after the details are enhanced is obviously better.
The obtaining manner of the enhancement processing manner is not limited in the embodiment of the present application, and reference may be made to the foregoing embodiment, which is not described herein again.
In addition, for a video region with texture complexity less than or equal to a preset texture complexity threshold, an enhancement processing mode may not be acquired, so as to increase the processing speed of video enhancement.
Optionally, for a video region with texture complexity less than or equal to a preset texture complexity threshold, processing for increasing contrast and saturation may also be performed.
In the embodiment of the present application, for the same video, if the resolution is not changed, determining whether the resolution is greater than the preset resolution threshold may be performed only once, and in the case that the resolution is not changed, determining, by the determined video frame, a selection of an enhancement processing mode according to the determination result.
Step S360: and respectively carrying out enhancement processing on a plurality of video areas of the video frame in a corresponding enhancement processing mode, wherein the enhancement processing improves the image quality of the video frame by adjusting the image parameters of the video frame.
In the embodiment of the application, whether enhancement processing is performed on the video area with low texture complexity in the video frame is determined according to the video resolution, so that for the video frame with high resolution, the video area with low texture complexity can not be subjected to enhancement processing due to the fact that the blocking effect is not serious, the system consumption of enhancement processing is reduced, the higher enhancement processing speed is obtained, differentiation processing can be performed on each video area in the video frame, a good video enhancement effect is obtained, and the super-definition effect is obtained.
The embodiment of the present application further provides a video processing apparatus 400, please refer to fig. 16, where the apparatus 400 includes: a region dividing module 410, configured to divide a video frame in a video into a plurality of video regions with different texture complexity; a mode obtaining module 420, configured to obtain enhancement processing modes corresponding to the multiple video regions respectively according to a correspondence between texture complexity and the enhancement processing modes; the processing module 430 is configured to perform enhancement processing on each of the plurality of video regions of the video frame in a corresponding enhancement processing manner, where the enhancement processing improves the image quality of the video frame by adjusting image parameters of the video frame.
Optionally, the area dividing module 410 may include: a dividing unit for dividing the video frame into a plurality of regions; the calculating unit is used for calculating the texture complexity of each region; and the merging unit is used for merging the adjacent areas with the texture complexity meeting the preset similarity to obtain a plurality of video areas with different texture complexities.
Optionally, the dividing unit may include an identifying subunit, configured to identify a target object of the video frame through a neural network; a dividing subunit, configured to divide the video frame into a region including the target object and a region not including the target object.
Optionally, the dividing unit may be configured to divide the video frame into a preset number of regions with the same shape.
Optionally, the merging unit may be configured to merge neighboring areas with texture complexity differences smaller than a preset threshold; or for merging neighboring regions with texture complexity within the same texture complexity range.
Optionally, the plurality of video regions includes a first video region and a second video region, and the texture complexity of the first video region is greater than that of the second video region. The mode obtaining module 420 may be configured to obtain an enhancement processing mode for removing a blocking effect from the first video region according to a correspondence between the texture complexity and the enhancement processing mode; and acquiring an enhancement processing mode for enhancing the details of the second video area according to the corresponding relation between the texture complexity and the enhancement processing mode.
Optionally, in this embodiment of the application, the processing module 430 may include: a dividing unit configured to divide the video frame into the plurality of video regions; the processing unit is used for performing enhancement processing on the plurality of video areas in a corresponding enhancement processing mode respectively; and the synthesizing unit is used for synthesizing the processed multiple video area images into a video frame for display.
Optionally, the embodiment of the present application may further include a resolution obtaining module, configured to obtain the resolution of the video; and the judging module is used for judging whether the resolution is greater than a preset resolution threshold value. If it is determined that the resolution is less than or equal to the preset resolution threshold, the mode obtaining module 420 may be configured to obtain enhancement processing modes corresponding to the plurality of video regions according to a correspondence between texture complexity and enhancement processing modes; if it is determined that the resolution is greater than the preset resolution threshold, the mode obtaining module 420 may be configured to obtain an enhancement processing mode corresponding to a video region of the plurality of video regions whose texture complexity is greater than the preset texture complexity threshold.
Because the human eye perception system has different sensitivities to different areas in a frame of picture, in the embodiment of the application, the area division can be carried out in the picture, the picture can be divided into different pictures with small resolution, namely different video areas, and different image quality enhancement algorithms are adopted for the different video areas, so that the optimal video display effect can be achieved. For example, a flat area and a texture-complex area may be divided according to the texture complexity, and a sub-picture may be divided into a plurality of small-resolution pictures.
For example, the human eye is generally more sensitive to a flat region (e.g., sky) and relatively insensitive to a region with complex grammatical structure (e.g., large leaves or carpet), but the flat region usually has severe mosaic and blocking effect due to quantization of an encoder, and therefore, in a flat region, demosaicing and deblocking are required to be performed, and algorithms for increasing contrast and saturation are required to eliminate or weaken algorithms for enhancing details and brightness. In a grammatical complex area, details are more, and human eyes are insensitive to blocking artifacts in the area, so that detail enhancement, sharpening, contrast increase, saturation increase, and de-mosaicing and de-blocking algorithms should be enhanced.
It will be clear to those skilled in the art that, for convenience and brevity of description, the various method embodiments described above may be referred to one another; for the specific working processes of the above-described devices and modules, reference may be made to corresponding processes in the foregoing method embodiments, which are not described herein again.
In the several embodiments provided in the present application, the coupling between the modules may be electrical, mechanical or other type of coupling.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
Referring to fig. 17, a block diagram of an electronic device 500 according to an embodiment of the present disclosure is shown. The electronic device 500 may be a smart phone, a tablet computer, a music playing device, or other electronic devices capable of running an application program. The electronic device includes one or more processors 510 (only one shown), memory 520, and one or more programs. Wherein the one or more programs are stored in the memory 520 and configured to be executed by the one or more processors 510. The one or more programs are configured to perform the methods described in the foregoing embodiments.
Processor 510 may include one or more processing cores. The processor 510 interfaces with various components throughout the electronic device 500 using various interfaces and circuitry to perform various functions of the electronic device 500 and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 520 and invoking data stored in the memory 520. Alternatively, the processor 510 may be implemented in hardware using at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 510 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing display content; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 510, but may be implemented by a communication chip.
The Memory 520 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). The memory 520 may be used to store instructions, programs, code sets, or instruction sets. The memory 520 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function, instructions for implementing the various method embodiments described above, and the like. The data storage area can also store data (such as a phone book, audio and video data, chatting record data) and the like created by the electronic equipment in use.
In addition, the electronic device 500 may further include a display screen for displaying the video to be displayed.
Referring to fig. 18, a block diagram of a computer-readable storage medium according to an embodiment of the present application is shown. The computer-readable storage medium 600 has stored therein program code that can be called by a processor to execute the method described in the above-described method embodiments.
The computer-readable storage medium 600 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer-readable storage medium 600 includes a non-volatile computer-readable storage medium. The computer readable storage medium 600 has storage space for program code 610 for performing any of the method steps of the method described above. The program code can be read from or written to one or more computer program products. The program code 610 may be compressed, for example, in a suitable form.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not necessarily depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (13)

1. A method of video processing, the method comprising:
dividing a video frame in a video into a plurality of video areas with different texture complexity;
acquiring enhancement processing modes respectively corresponding to the plurality of video areas according to the corresponding relation between texture complexity and the enhancement processing modes, wherein the video area with texture complexity lower than the specified texture complexity in the plurality of video areas is a first area, the video area with texture complexity higher than the specified texture complexity in the plurality of video areas is a second area, the enhancement processing modes comprise an image processing algorithm for removing a blocking effect and enhancing details, the effect of removing the blocking effect is gradually enhanced according to the fact that the texture complexity is from high to low for the first area, and the detail enhancement effect is gradually enhanced according to the fact that the texture complexity is from low to high for the second area;
and respectively carrying out enhancement processing on a plurality of video areas of the video frame in a corresponding enhancement processing mode, wherein the enhancement processing improves the image quality of the video frame by adjusting the image parameters of the video frame.
2. The method according to claim 1, wherein the dividing a video frame in a video into a plurality of video regions with different texture complexity comprises:
dividing the video frame into a plurality of regions;
calculating the texture complexity of each region;
and merging the adjacent areas with the texture complexity meeting the preset similarity to obtain a plurality of video areas with different texture complexities.
3. The method of claim 2, wherein the dividing the video frame into a plurality of regions comprises:
identifying a target object of the video frame through a neural network;
the video frame is divided into a region including a target object and a region not including the target object.
4. The method of claim 2, wherein the dividing the video frame into a plurality of regions comprises:
and dividing the video frame into a preset number of regions with the same shape.
5. The method of claim 2, wherein the merging the neighboring regions with the texture complexity satisfying the preset similarity comprises:
and merging the adjacent regions with the texture complexity difference smaller than a preset threshold value.
6. The method of claim 2, wherein a plurality of texture complexity ranges are stored, and the merging the neighboring regions with the texture complexity satisfying the preset similarity comprises:
and merging adjacent regions with the texture complexity within the same texture complexity range.
7. The method according to claim 1, wherein the plurality of video regions include a first video region and a second video region, the texture complexity of the first video region is greater than the texture complexity of the second video region, and the obtaining enhancement processing modes corresponding to the plurality of video regions respectively according to the correspondence between the texture complexity and the enhancement processing modes comprises:
acquiring an enhancement processing mode for removing the blocking effect of the first video area according to the corresponding relation between the texture complexity and the enhancement processing mode;
and acquiring an enhancement processing mode for enhancing the details of the second video area according to the corresponding relation between the texture complexity and the enhancement processing mode.
8. The method according to claim 7, wherein before obtaining enhancement processing modes corresponding to the plurality of video regions respectively according to the correspondence between the texture complexity and the enhancement processing modes, the method further comprises:
acquiring the resolution of the video;
judging whether the resolution is larger than a preset resolution threshold value or not;
and if the resolution is less than or equal to a preset resolution threshold, executing the step of obtaining the enhanced processing modes respectively corresponding to the plurality of video areas according to the corresponding relation between the texture complexity and the enhanced processing modes.
9. The method according to claim 8, wherein if the resolution is greater than a preset resolution threshold, obtaining enhancement processing modes corresponding to the plurality of video regions according to a correspondence between texture complexity and enhancement processing modes comprises:
and acquiring an enhancement processing mode corresponding to the video area with the texture complexity larger than a preset texture complexity threshold value in the plurality of video areas.
10. The method according to claim 1, wherein the enhancing the plurality of video regions of the video frame in the corresponding enhancing manners respectively comprises:
dividing the video frame into the plurality of video regions;
enhancing the plurality of video areas in a corresponding enhancing processing mode respectively;
and synthesizing the plurality of processed video area images into a video frame for display.
11. A video processing apparatus, characterized in that the apparatus comprises:
the region dividing module is used for dividing a video frame in a video into a plurality of video regions with different texture complexity;
the mode acquiring module is used for acquiring enhancement processing modes corresponding to the video areas respectively according to the corresponding relation between the texture complexity and the enhancement processing modes, wherein the video area with the texture complexity lower than the specified texture complexity in the video areas is a first area, the video area with the texture complexity higher than the specified texture complexity in the video areas is a second area, the enhancement processing modes comprise image processing algorithms for removing the blocking effect and enhancing the details, the effect of removing the blocking effect is gradually enhanced on the first area according to the texture complexity from high to low, and the effect of enhancing the details is gradually enhanced on the second area according to the texture complexity from low to high;
and the processing module is used for respectively carrying out enhancement processing on a plurality of video areas of the video frame in a corresponding enhancement processing mode, and the enhancement processing improves the image quality of the video frame by adjusting the image parameters of the video frame.
12. An electronic device, comprising:
one or more processors;
a memory;
one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method of any of claims 1-10.
13. A computer-readable storage medium, having stored thereon program code that can be invoked by a processor to perform the method according to any one of claims 1 to 10.
CN201811428044.9A 2018-11-27 2018-11-27 Video processing method and device, electronic equipment and storage medium Active CN109660821B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811428044.9A CN109660821B (en) 2018-11-27 2018-11-27 Video processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811428044.9A CN109660821B (en) 2018-11-27 2018-11-27 Video processing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109660821A CN109660821A (en) 2019-04-19
CN109660821B true CN109660821B (en) 2021-09-14

Family

ID=66111807

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811428044.9A Active CN109660821B (en) 2018-11-27 2018-11-27 Video processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109660821B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110378860B (en) * 2019-07-30 2023-08-18 腾讯科技(深圳)有限公司 Method, device, computer equipment and storage medium for repairing video
CN111193911B (en) * 2020-01-15 2021-12-14 未来新视界文化科技(嘉善)有限公司 Fast transmission processing method and device for big data video
CN111598796B (en) * 2020-04-27 2023-09-05 Oppo广东移动通信有限公司 Image processing method and device, electronic equipment and storage medium
CN112181657B (en) * 2020-09-30 2024-05-07 京东方科技集团股份有限公司 Video processing method, device, electronic equipment and storage medium
CN112351336A (en) * 2020-10-29 2021-02-09 南京创维信息技术研究院有限公司 Method, device, terminal and medium for optimizing television image quality based on video image segmentation
CN112102212B (en) * 2020-11-19 2021-02-09 腾讯科技(深圳)有限公司 Video restoration method, device, equipment and storage medium
CN114567814A (en) * 2022-04-28 2022-05-31 阿里巴巴达摩院(杭州)科技有限公司 Video processing method, video rendering method, processor and storage medium
CN115330803B (en) * 2022-10-17 2023-01-24 菲特(天津)检测技术有限公司 Surface defect data enhancement method and device, electronic equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104580826A (en) * 2015-02-03 2015-04-29 成都金本华科技股份有限公司 Video signal processing method for improving image sharpness

Family Cites Families (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8159558B2 (en) * 2006-06-02 2012-04-17 Rohm Co., Ltd. Image processing circuit, semiconductor device and image processing device
KR101552475B1 (en) * 2007-11-22 2015-09-11 가부시키가이샤 한도오따이 에네루기 켄큐쇼 Image processing method, image display system, and computer program
CN101616324B (en) * 2009-07-28 2011-06-08 谭洪舟 Blocky effect removal device for compression coded image
CN101968924A (en) * 2010-10-19 2011-02-09 北方工业大学 High-resolution image-based real-time traffic flow detection method
CN102611831B (en) * 2012-01-12 2014-09-24 陆许明 Method for reducing compressed image encoding noise
CN104427336B (en) * 2013-09-02 2018-09-14 苏州威迪斯特光电科技有限公司 Video quality improvement method based on region of interest domain compensation coding
CN103473748A (en) * 2013-09-23 2013-12-25 中国矿业大学(北京) Method for enhancing underground coal mine image
CN104715453A (en) * 2013-12-12 2015-06-17 苏州长风航空电子有限公司 Image enhancement method by adopting regional processing mode and circuit
CN104202604B (en) * 2014-08-14 2017-09-22 深圳市腾讯计算机系统有限公司 The method and apparatus of video source modeling
CN106550244A (en) * 2015-09-16 2017-03-29 广州市动景计算机科技有限公司 The picture quality enhancement method and device of video image
CN105872843B (en) * 2016-04-18 2019-02-19 青岛海信电器股份有限公司 A kind of method and device playing video
CN108122206A (en) * 2016-11-29 2018-06-05 深圳市中兴微电子技术有限公司 A kind of low-light (level) image denoising method and device
CN106604057A (en) * 2016-12-07 2017-04-26 乐视控股(北京)有限公司 Video processing method and apparatus thereof
CN107291413A (en) * 2017-06-08 2017-10-24 深圳Tcl新技术有限公司 Display terminal, picture contrast improve method and computer-readable recording medium
CN107633491A (en) * 2017-09-26 2018-01-26 中国科学院长春光学精密机械与物理研究所 A kind of area image Enhancement Method and storage medium based on target detection
CN108810649B (en) * 2018-07-12 2021-12-21 深圳创维-Rgb电子有限公司 Image quality adjusting method, intelligent television and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104580826A (en) * 2015-02-03 2015-04-29 成都金本华科技股份有限公司 Video signal processing method for improving image sharpness

Also Published As

Publication number Publication date
CN109660821A (en) 2019-04-19

Similar Documents

Publication Publication Date Title
CN109660821B (en) Video processing method and device, electronic equipment and storage medium
CN109379625B (en) Video processing method, video processing device, electronic equipment and computer readable medium
CN109640167B (en) Video processing method and device, electronic equipment and storage medium
CN109685726B (en) Game scene processing method and device, electronic equipment and storage medium
CN109640168B (en) Video processing method, video processing device, electronic equipment and computer readable medium
CN109729405B (en) Video processing method and device, electronic equipment and storage medium
CN109379624B (en) Video processing method and device, electronic equipment and storage medium
KR101240450B1 (en) Methods for determining block averages for film grain simulation
WO2020107989A1 (en) Video processing method and apparatus, and electronic device and storage medium
US20190180454A1 (en) Detecting motion dragging artifacts for dynamic adjustment of frame rate conversion settings
CN109168065B (en) Video enhancement method and device, electronic equipment and storage medium
CN109379628B (en) Video processing method and device, electronic equipment and computer readable medium
CN108965847B (en) Method and device for processing panoramic video data
CN109361949B (en) Video processing method, video processing device, electronic equipment and storage medium
CN109640169B (en) Video enhancement control method and device and electronic equipment
JP2023513304A (en) Motion Smoothing in Distributed Systems
CN109345490B (en) Method and system for enhancing real-time video image quality of mobile playing terminal
WO2021193648A1 (en) Image processing device and server
US11562772B2 (en) Video processing method, electronic device, and storage medium
CN109618228B (en) Video enhancement control method and device and electronic equipment
WO2021193649A1 (en) Image processing device and server
US20230316464A1 (en) Virtual view drawing method and apparatus, rendering method and apparatus, and decoding method and apparatus, and devices and storage medium
US11600026B2 (en) Data processing systems
WO2021199205A1 (en) Image data transfer apparatus, image display system, and image data transfer method
CN109379630B (en) Video processing method and device, electronic equipment and storage medium

Legal Events

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