CN110996174B - Video image quality enhancement method and related equipment thereof - Google Patents

Video image quality enhancement method and related equipment thereof Download PDF

Info

Publication number
CN110996174B
CN110996174B CN201911319545.8A CN201911319545A CN110996174B CN 110996174 B CN110996174 B CN 110996174B CN 201911319545 A CN201911319545 A CN 201911319545A CN 110996174 B CN110996174 B CN 110996174B
Authority
CN
China
Prior art keywords
value
video frame
calculating
standard value
current video
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
CN201911319545.8A
Other languages
Chinese (zh)
Other versions
CN110996174A (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.)
Shenzhen Xunlei Network Technology Co Ltd
Original Assignee
Shenzhen Xunlei Network 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 Shenzhen Xunlei Network Technology Co Ltd filed Critical Shenzhen Xunlei Network Technology Co Ltd
Priority to CN201911319545.8A priority Critical patent/CN110996174B/en
Publication of CN110996174A publication Critical patent/CN110996174A/en
Application granted granted Critical
Publication of CN110996174B publication Critical patent/CN110996174B/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/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, rendering scenes according to MPEG-4 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/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/44012Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving rendering scenes according to scene graphs, e.g. MPEG-4 scene graphs

Abstract

The invention discloses a video image quality enhancement method, which comprises the steps of obtaining pixel data of a current video frame; calculating the gray value of each pixel point according to the pixel data; calculating the mean square error of the current video frame according to the gray value of each pixel point; selecting a minimum standard value and a maximum standard value of the gray value according to a preset rule; when the mean square error exceeds a preset threshold value, carrying out picture adjustment on the current video frame by using the minimum standard value and the maximum standard value; and when the mean square error does not exceed the preset threshold value, calculating according to the minimum standard value and the maximum standard value to obtain an adjusting parameter, and carrying out picture adjustment on the current video frame by using the adjusting parameter. The invention also discloses video image quality enhancement equipment, a video image quality enhancement device, a computer readable storage medium and a computer program product. The technical scheme of the invention can enhance the image quality of the played video more effectively so as to obtain a clearer picture and ensure the watching experience of a user.

Description

Video image quality enhancement method and related equipment thereof
Technical Field
The present invention relates to the field of image processing, and in particular, to a video quality enhancement method, and further, to a video quality enhancement apparatus, a video quality enhancement device, a computer-readable storage medium, and a computer program product.
Background
At present, the development of network video is very rapid, and the network video plays an increasingly important role in the life of people. However, the quality of the video to be finally played out is severely degraded due to the influence of factors such as the quality of the captured video, post-production, and transcoding of the video.
In order to improve the quality of video images and enhance the viewing experience of users, image quality enhancement, that is, image enhancement processing, such as adjusting the contrast, saturation, color, etc., of a display device, is generally performed on the video images at a playing end. However, the playing method still cannot meet the requirement of video graphic display with constantly changing brightness, and a video picture with a dim picture or an overexposed picture still appears, thereby reducing the user experience.
Therefore, how to perform more effective image quality enhancement on the played video to obtain a clearer picture and ensure the user viewing experience is a problem to be solved urgently by those skilled in the art.
Disclosure of Invention
The invention mainly aims to provide a video image quality enhancement method, a device, a computer readable storage medium and a computer program product, aiming at solving the problems that the quality of the played video image is poor and the watching experience of a user is difficult to ensure in the prior art.
In order to achieve the above object, the present invention provides a video image quality enhancement method, including:
acquiring pixel data of a current video frame;
calculating the gray value of each pixel point according to the pixel data;
calculating the mean square error of the current video frame according to the gray value of each pixel point;
selecting the minimum standard value and the maximum standard value of the gray value according to a preset rule;
when the mean square error exceeds a preset threshold value, utilizing the minimum standard value and the maximum standard value to perform picture adjustment on the current video frame;
and when the mean square error does not exceed the preset threshold value, calculating according to the minimum standard value and the maximum standard value to obtain an adjusting parameter, and performing picture adjustment on the current video frame by using the adjusting parameter.
Preferably, the acquiring pixel data of the current video frame includes:
and acquiring the pixel data of the thumbnail of the current video frame.
Preferably, the acquiring pixel data of the thumbnail of the current video frame includes:
and performing off-screen rendering on the thumbnail of the current video frame to obtain the pixel data.
Preferably, the acquiring pixel data of the thumbnail of the current video frame includes:
and reading and obtaining the pixel data of the thumbnail of the current video frame according to the specified data address.
Preferably, the calculating the mean square error of the current video frame according to the gray value of each pixel point includes:
calculating the difference value of the gray value of each pixel point in the current video frame and the gray value of the corresponding pixel point in the previous video frame to obtain the gray value difference of each pixel point;
and calculating to obtain the mean square error of the current video frame according to the gray value differences.
Preferably, the performing picture adjustment on the current video frame by using the minimum standard value and the maximum standard value includes:
calculating the difference value between the current pixel value of each color channel in each pixel point and the minimum standard value to obtain each first color difference value;
calculating the product of each color difference value and the maximum standard value to obtain each first color product;
and taking each first color product as the current pixel value of the corresponding color channel.
Preferably, the calculating according to the minimum standard value and the maximum standard value to obtain an adjustment parameter, and performing picture adjustment on the current video frame by using the adjustment parameter includes:
calculating the difference value between the minimum standard value of the current video frame and the minimum standard value of the previous video frame to obtain a first difference value;
calculating the difference value between the maximum standard value of the current video frame and the maximum standard value of the previous video frame to obtain a second difference value;
updating the minimum standard value of the current video frame by using the first difference value to obtain an updated minimum standard value;
updating the maximum standard value of the current video frame by using the second difference value to obtain an updated maximum standard value;
calculating the difference value between the updated minimum standard value and the updated maximum standard value to obtain a third difference value;
calculating to obtain a multiplication parameter according to the third difference;
calculating to obtain a subtraction parameter according to the updated minimum standard value;
and adjusting the current video frame by using the multiplication parameter and the subtraction parameter.
Preferably, the performing picture adjustment on the current video frame by using the multiplication parameter and the subtraction parameter includes:
calculating the difference value between the current pixel value of each color channel in each pixel point and the subtraction parameter to obtain each second color difference value;
calculating the product of each color difference value and the multiplication parameter to obtain each second color product;
and taking each second color product as the current pixel value of the corresponding color channel.
In order to achieve the above object, the present invention provides a video quality enhancement apparatus, which includes a memory and a processor, wherein the memory stores a video quality enhancement program capable of running on the processor, and the video quality enhancement program, when executed by the processor, implements the steps of the video quality enhancement method according to any one of the above.
To achieve the above object, the present invention provides a video quality enhancement apparatus, comprising:
the pixel data acquisition module is used for acquiring the pixel data of the current video frame;
the gray value calculation module is used for calculating the gray value of each pixel point according to the pixel data;
the mean square error calculation module is used for calculating the mean square error of the current video frame according to the gray value of each pixel point;
the standard gray value selecting module is used for selecting the minimum standard value and the maximum standard value of the gray value according to a preset rule;
the first image quality enhancement module is used for adjusting the image of the current video frame by utilizing the minimum standard value and the maximum standard value when the mean square error exceeds a preset threshold value;
and the second image quality enhancement module is used for calculating and obtaining an adjustment parameter according to the minimum standard value and the maximum standard value when the mean square error does not exceed the preset threshold value, and carrying out image adjustment on the current video frame by using the adjustment parameter.
To achieve the above object, the present invention provides a computer-readable storage medium having a video quality enhancement program stored thereon, where the video quality enhancement program is executable by one or more processors to implement the steps of the video quality enhancement method as described in any one of the above.
To achieve the above object, the present invention provides a computer program product, which comprises computer instructions that, when run on a computer, enable the computer to perform the steps of any of the above-mentioned video quality enhancement methods.
The invention provides a video image quality enhancement method, which comprises the steps of obtaining pixel data of a current video frame; calculating the gray value of each pixel point according to the pixel data; calculating the mean square error of the current video frame according to the gray value of each pixel point; selecting the minimum standard value and the maximum standard value of the gray value according to a preset rule; when the mean square error exceeds a preset threshold value, utilizing the minimum standard value and the maximum standard value to perform picture adjustment on the current video frame; and when the mean square error does not exceed the preset threshold value, calculating according to the minimum standard value and the maximum standard value to obtain an adjusting parameter, and performing picture adjustment on the current video frame by using the adjusting parameter. Therefore, according to the technical scheme provided by the invention, the pixel value and the gray value of each video frame in the video information are acquired, and the picture enhancement of the video information is realized based on the pixel data and the gray value, namely, the image quality enhancement is carried out starting from the video information, compared with the method for realizing the image quality enhancement by adjusting the playing end in the prior art, the method for realizing the image quality enhancement fundamentally solves the problem of poor video playing image quality, can restore the dim or overexposed video picture into the comfortable and high-identifiability clear image quality, and further improves the watching experience of a user.
The video image quality enhancement device, the apparatus, the computer readable storage medium and the computer program product provided by the present invention all have the above beneficial effects, and are not described herein again.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a schematic flow chart of a first embodiment of the present invention;
fig. 2 is a color level distribution diagram before image quality enhancement according to a second embodiment of the present invention;
FIG. 3 is a color level distribution diagram after image quality enhancement according to a second embodiment of the present invention;
FIG. 4 is a schematic diagram illustrating an internal structure of a video quality enhancement apparatus according to a first embodiment of the present invention;
fig. 5 is a block diagram of a third embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the drawings described above, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that the description relating to "first", "second", etc. in the present invention is for descriptive purposes only and is not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.
The invention provides a video image quality enhancement method.
Referring to fig. 1, fig. 1 is a schematic flow chart of a first embodiment of the present invention.
In a first embodiment, the method may comprise:
s10: acquiring pixel data of a current video frame;
the step aims to realize the acquisition of pixel data in a video frame, wherein the video frame can be specifically acquired from video information, the video information is video data to be played, the video frame is a single image picture with the minimum unit in the video information, one frame is a static picture, and continuous frames form a video. Specifically, the video information may be subjected to framing processing to obtain each video frame, and further, pixel data in the current video frame may be obtained.
Preferably, the acquiring pixel data of the current video frame may include: pixel data of a thumbnail of a current video frame is acquired.
Preferably, the acquiring of the pixel data of the thumbnail of the current video frame may include: and performing off-screen rendering on the thumbnail of the current video frame to obtain pixel data.
The preferred embodiment provides a more specific method for acquiring thumbnail image pixel data, which is realized by hardware decoding, wherein the hardware decoding is realized by submitting a part of video data which is originally and completely submitted to a CPU (central processing unit) to a GPU (graphics processing unit), and the parallel computing capability of the GPU is far higher than that of the CPU, so that the load of the CPU can be greatly reduced; therefore, off-screen rendering can be performed on the thumbnail of the current video frame through the GPU, and pixel data can be acquired.
Preferably, the acquiring of the pixel data of the thumbnail of the current video frame may include: and reading the pixel data of the thumbnail of the current video frame according to the designated data address.
The preferred embodiment provides another specific method for acquiring thumbnail image pixel data, that is, the method is implemented by software decoding, where the software decoding is implemented by letting a CPU decode video data through software, and the CPU has a relatively large burden, and when the method is implemented specifically, the software is used to directly read pixel data from a specified data address.
S11: calculating to obtain the gray value of each pixel point according to the pixel data;
this step is intended to realize the calculation of the gray value of each pixel point in the current video frame, the gray value refers to the color depth of the midpoint in the black-and-white image, the range is generally from 0 to 255, white is 255, black is 0, so the black-and-white image is also called as a gray image. The specific calculation method of the gray-scale value based on the pixel data is as follows:
the pixel data is 4 bytes of data, and the 2 nd, 3 rd and 4 th bytes of the data are R, G, B th data, respectively, so that the gray-scale value Y is (30 × R +59 × G +11 × B)/100.
S12: calculating according to the gray value of each pixel point to obtain the mean square error of the current video frame;
the step aims to realize the calculation of the mean square error of each pixel point in the current video frame, wherein the mean square error refers to the expected value of the square of the difference between the estimated value of the parameter and the actual value of the parameter, so that the mean square error can be used as the judgment standard for picture adjustment, and the value of the mean square error is compared with the corresponding standard value, namely the standard threshold value, so that corresponding picture adjustment measures can be taken according to the comparison result.
Preferably, the obtaining of the mean square error of the current video frame according to the calculation of each gray value may include: calculating the difference value of the gray value of each pixel point in the current video frame and the gray value of the corresponding pixel point in the previous video frame to obtain the gray value difference of each pixel point; and calculating to obtain the mean square error of the current video frame according to the gray value differences.
The preferred embodiment provides a more specific mean square error calculation method, that is, a gray scale difference of each pixel point is obtained based on the difference calculation of the gray scale values of the pixel points corresponding to the adjacent video frames, and then the mean square error is obtained by utilizing the calculation of each gray scale difference.
S13: selecting a minimum standard value and a maximum standard value of the gray value according to a preset rule;
this step aims to achieve the acquisition of the standard values, i.e. the minimum standard value and the maximum standard value, so as to achieve the automatic tone scale-based picture adjustment based on the two, and the process can be selected from various gray values based on preset rules. Wherein, the automatic color gradation is to automatically define the brightest and darkest pixels in each channel as white and black, respectively, and then to redistribute the pixel values in between proportionally.
Specifically, the gray values of the pixels may be sorted according to a preset sorting rule, for example, the gray values are sorted in a descending order or in a descending order, and the gray value sequence can be obtained without limitation in the present application; further, the gray values at two positions specified in advance are selected from the gray value sequence in the sequence as the minimum standard value and the maximum standard value, respectively, it can be understood that the minimum standard value is selected from the end with the smaller value in the gray value sequence, and the maximum standard value is selected from the end with the larger value in the gray value sequence, for example, if the gray value sequence is arranged by the gray values from the smaller to the larger order, the minimum standard value can be selected from the gray value of the previous part of the sequence, and the maximum standard value can be selected from the gray value of the next part of the sequence.
For example, for a gray value sequence in which the gray values are arranged in the order from small to large, the first gray value may be selected as the minimum standard value, the last gray value may be selected as the maximum standard value, or the 1 st% gray value may be selected as the minimum standard value, and the 99 th% gray value may be selected as the maximum standard value, which is not limited in the present application.
S14: when the mean square error exceeds a preset threshold value, carrying out picture adjustment on the current video frame by using the minimum standard value and the maximum standard value;
s15: and when the mean square error does not exceed the preset threshold value, calculating according to the minimum standard value and the maximum standard value to obtain an adjusting parameter, and carrying out picture adjustment on the current video frame by using the adjusting parameter.
The above steps are intended to realize picture adjustment, specifically, for the mean square error, a corresponding standard threshold value, that is, the preset threshold value, may be preset, if the mean square error of the current video frame exceeds the preset threshold value, picture adjustment may be directly performed on the current video frame according to the minimum standard value and the maximum standard value obtained by the above calculation, that is, the minimum standard value and the maximum standard value are used as standards, and each pixel data in the current video frame is redistributed according to the proportion; if the mean square error of the current video frame does not exceed the preset threshold, the maximum standard value and the minimum standard value can be adjusted and optimized to obtain the optimized standard value, namely the adjustment parameter, and then the adjustment parameter is used for realizing the picture adjustment of the current video frame, wherein the specific type and the calculation method of the adjustment parameter can be set by technicians according to actual requirements, and the method is not limited in the application.
In addition, the specific value of the preset threshold does not affect the implementation of the present technical solution, and the present application does not limit this, for example, in the present application, after the parameter is adjusted based on the image quality of a large amount of video file data, the specific value of the preset threshold is set to 2300, so as to obtain the optimal image quality. Therefore, the picture adjustment of the current video frame is realized.
Preferably, the calculating to obtain the adjustment parameter according to the minimum standard value and the maximum standard value, and performing picture adjustment on the current video frame by using the adjustment parameter may include: calculating the difference value between the minimum standard value of the current video frame and the minimum standard value of the previous video frame to obtain a first difference value; calculating the difference value between the maximum standard value of the current video frame and the maximum standard value of the previous video frame to obtain a second difference value; updating the minimum standard value of the current video frame by using the first difference value to obtain an updated minimum standard value; updating the maximum standard value of the current video frame by using the second difference value to obtain an updated maximum standard value; calculating the difference value between the updated minimum standard value and the updated maximum standard value to obtain a third difference value; calculating to obtain a multiplication parameter according to the third difference; calculating to obtain a subtraction parameter according to the updated minimum standard value; and performing picture adjustment on the current video frame by using the multiplication parameter and the subtraction parameter.
The preferred embodiment provides a more specific picture adjustment method based on adjustment parameters, wherein the adjustment parameters specifically include multiplication parameters and subtraction parameters, and corresponding values thereof can be obtained by calculation based on a minimum standard value and a maximum standard value; further, the current video frame is adjusted by using the multiplication parameter and the subtraction parameter.
It can be understood that based on the above explanation, the picture adjustment of a certain video frame in the video data is realized, and on this basis, the picture adjustment of the whole video data can be realized by performing the picture adjustment on each video frame in the video data by using the method, so as to realize the enhancement of the video image quality.
Preferably, the performing picture adjustment on the current video frame by using the minimum standard value and the maximum standard value may include: calculating the difference value between the current pixel value of each color channel in each pixel point and the minimum standard value to obtain each first color difference value; calculating the product of each color difference value and the maximum standard value to obtain each first color product; and taking each first color product as the current pixel value of the corresponding color channel.
Preferably, the picture adjustment of the current video frame by using the multiplication parameter and the subtraction parameter may include: calculating the difference value between the current pixel value of each color channel in each pixel point and the subtraction parameter to obtain each second color difference value; calculating the product of each color difference value and the multiplication parameter to obtain each second color product; and taking each second color product as the current pixel value of the corresponding color channel.
For the specific implementation process of video image quality enhancement, the preferred embodiment provides a specific implementation method, that is, the pixel values of the color channels in the pixel points are optimized, wherein the standard color channels include an R channel (red channel), a G channel (green channel), and a B channel (blue channel). Specifically, when the mean square error exceeds a preset threshold value and the minimum standard value and the maximum standard value are used for carrying out picture adjustment on the current video frame, the minimum standard value and the maximum standard value are used for optimizing the current pixel value of each color channel; and when the mean square error does not exceed the preset threshold value and the current video frame is subjected to picture adjustment by using the multiplication parameters and the subtraction parameters, optimizing the current pixel values of each color channel by using the multiplication parameters and the subtraction parameters so as to obtain the corresponding updated pixel values, thereby finishing the video image quality enhancement.
Compared with the method for enhancing the image quality by adjusting the playing end in the prior art, the method for enhancing the image quality of the video fundamentally solves the problem of poor image quality of video playing, can restore dim or overexposed video images into comfortable and high-identifiability clear image quality, and further improves the watching experience of users.
On the basis of the above embodiments, the present invention provides another video quality enhancement method.
The video image quality enhancement method provided by the second embodiment of the present application includes the following specific implementation procedures:
(1) acquiring pixel data of a thumbnail of a current frame (current video frame) of video data, and specifically, selectively acquiring pixel data of 200 × 150;
(2) counting a distribution graph of gray value Y values of all pixel points of the current video frame by traversing all pixel data, and calculating the mean square error MSE of the gray value Y values of all pixel points of the current video frame and the Y values of all corresponding pixel points in the previous video frame:
MSE=(s1 2+s2 2+…+sn 2)/n;
s is pixel YCurrent frame-pixel YLast frame
Wherein s is a difference value (gray scale difference value) of Y values of adjacent video frames, and n is an identifier of pixel data;
furthermore, the Y-value distribution diagram can be counted into a preset Info array;
(3) using the statistical Y-value number distribution value in the Info array, from small to large 1% of Y-values to obtain normaizeminThe value (minimum standard value) of normaize was obtained from 1% of Y values in the order of magnitudemaxValue (maximum normalized value);
(4) when MSE is larger than 2300, it indicates that the frame variation amplitude is large, and normaize can be directly usedminAnd NormalizemaxThe picture is adjusted in place, and the specific adjustment mode is as follows:
R=(R-Normalizemin)*Normalizemax
G=(G-Normalizemin)*Normalizemax
B=(B-Normalizemin)*Normalizemax
(5) when the MSE is smaller than 2300, a smooth gradual adjustment is needed, otherwise, unsmooth jitter of brightness and image quality is likely to occur, and the adjustment method is as follows:
firstly, respectively communicate with normaize of the previous video frameminAnd NormalizemaxCalculating the difference to obtain normaizeDifference in min(first difference) and normaizemax difference(second difference); further, the updated minimum standard value and the maximum standard value are obtained by calculation according to the two values:
Normalizemin=Normalizeone frame above min+NormalizeDifference in min/8;
Normalizemax=Normalizemax last frame+NormalizeDifference in min/8;
(6) By NormalizeminAnd NormalizemaxSubtracting to obtain normaizerange(third difference);
(7) by NormalizerangeCalculating to obtain multiplication parameters:
Normalizemul=255.0f/Normalizerange
(8) by NormalizeminCalculating to obtain a subtraction parameter:
Normalizereducing=Normalizemin*0.f/255.0f;
(9) And adjusting the whole image of the current video frame by using the multiplication parameter and the subtraction parameter in the following specific adjustment mode:
R=(R-Normalizereducing)*Normalizemul
G=(G-NormalizeReducing)*Normalizemul
B=(B-NormalizeReducing)*Normalizemul
Therefore, the picture adjustment of the current video frame is realized, and the specific realization can be realized through a shader language; further, based on the above process, the image quality of the video can be enhanced by performing image adjustment on each video frame in the video data.
Further, referring to fig. 2 and fig. 3, fig. 2 is a color level distribution diagram before image quality enhancement according to a second embodiment of the present invention; fig. 3 is a color level distribution diagram after image quality enhancement according to the second embodiment of the present invention, which is obvious that the color level distribution after image quality enhancement is more uniform than the color level distribution before image quality enhancement.
Therefore, the video image quality enhancement method provided by this embodiment obtains the pixel value and the gray value of each video frame in the video information, and further implements image quality enhancement of the video information based on the pixel data and the gray value, that is, performs image quality enhancement starting from the video information itself.
The invention provides video image quality enhancement equipment.
Referring to fig. 4, fig. 4 is a schematic diagram of an internal structure of a video quality enhancement apparatus according to a first embodiment of the present invention.
In this embodiment, the video quality enhancement device 1 may be a PC (Personal Computer), a smart phone, a tablet Computer, a palm Computer, a portable Computer, an intelligent router, an ore machine, a network storage device, or a terminal device.
The video quality enhancement device 1 may include a memory 11, a processor 12, and a bus 13.
The memory 11 includes at least one type of readable storage medium, which includes a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, and the like. The memory 11 may in some embodiments be an internal storage unit of the video quality enhancement device 1, for example a hard disk of the video quality enhancement device 1. The memory 11 may also be an external storage device of the video quality enhancement device 1 in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the video quality enhancement device 1. Further, the memory 11 may include both an internal storage unit of the video quality enhancement apparatus 1 and an external storage device. The memory 11 may be used not only to store application software installed in the video quality enhancement apparatus 1 and various types of data, such as codes of a video quality enhancement program, but also to temporarily store data that has been output or is to be output.
The processor 12, which may be a Central Processing Unit (CPU), a controller, a microcontroller, a microprocessor or other data Processing chip, is used to execute program codes stored in the memory 11 or process data, such as executing video image quality enhancement programs.
The bus 13 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 4, but this does not indicate only one bus or one type of bus.
Further, the video quality enhancement apparatus 1 may further include a network interface, and the network interface may optionally include a wired interface and/or a wireless interface (such as a WI-FI interface, a bluetooth interface, etc.), which is generally used to establish a communication connection between the video quality enhancement apparatus 1 and other electronic devices.
Optionally, the video quality enhancement apparatus 1 may further include a user interface, where the user interface may include a Display (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface may further include a standard wired interface and a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the video quality enhancement apparatus 1 and for displaying a visualized user interface.
Fig. 4 only shows the video quality enhancement apparatus 1 with the components 11-13 and the video quality enhancement program, and it will be understood by those skilled in the art that the structure shown in fig. 4 does not constitute a limitation of the video quality enhancement apparatus 1, and may include fewer or more components than those shown, or some components may be combined, or a different arrangement of components.
The invention provides a video image quality enhancement device.
Referring to fig. 5, fig. 5 is a block diagram illustrating a third embodiment of the present invention.
In a third embodiment, the video quality enhancement apparatus may include:
a pixel data obtaining module 100, configured to obtain pixel data of a current video frame;
a gray value calculating module 200, configured to calculate a gray value of each pixel point according to the pixel data;
the mean square error calculation module 300 is configured to calculate a mean square error of the current video frame according to the gray value of each pixel;
a standard gray value selecting module 400, configured to select a minimum standard value and a maximum standard value of a gray value according to a preset rule;
the first image quality enhancement module 500 is configured to perform image adjustment on a current video frame by using a minimum standard value and a maximum standard value when a mean square error exceeds a preset threshold;
the second image quality enhancement module 600 is configured to, when the mean square error does not exceed the preset threshold, calculate and obtain an adjustment parameter according to the minimum standard value and the maximum standard value, and perform image adjustment on the current video frame by using the adjustment parameter.
For the introduction of the apparatus provided in the present application, please refer to the above method embodiments, which are not described herein again.
Embodiments of the present invention further provide a computer-readable storage medium, on which a video quality enhancement program is stored, where the video quality enhancement program is executable by one or more processors to implement the steps of the video quality enhancement method according to any of the above embodiments.
An embodiment of the present invention further provides a computer program product, where the computer program product includes computer instructions, and when the computer instructions run on a computer, the computer is enabled to execute the steps of the video image quality enhancement method according to any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product.
The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can store or a data storage device, such as a server, a data center, etc., that is integrated with one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatus and system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus, system, and method may be implemented in other ways. For example, the above-described system embodiments are merely illustrative, and for example, the division of the units is only one logical functional division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It should be noted that the above-mentioned numbers of the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments. And the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that includes the element.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (9)

1. A method for enhancing video quality, the method comprising:
acquiring pixel data of a current video frame;
calculating the gray value of each pixel point according to the pixel data;
calculating the mean square error of the current video frame according to the gray value of each pixel point;
selecting the minimum standard value and the maximum standard value of the gray value according to a preset rule;
when the mean square error exceeds a preset threshold value, calculating the difference value between the current pixel value of each color channel in each pixel point and the minimum standard value to obtain each first color difference value; calculating the product of each color difference value and the maximum standard value to obtain each first color product; taking each first color product as a current pixel value of a corresponding color channel;
when the mean square error does not exceed the preset threshold, calculating the difference value between the minimum standard value of the current video frame and the minimum standard value of the previous video frame to obtain a first difference value; calculating the difference value between the maximum standard value of the current video frame and the maximum standard value of the previous video frame to obtain a second difference value; updating the minimum standard value of the current video frame by using the first difference value to obtain an updated minimum standard value; updating the maximum standard value of the current video frame by using the second difference value to obtain an updated maximum standard value; calculating the difference value between the updated minimum standard value and the updated maximum standard value to obtain a third difference value; calculating to obtain a multiplication parameter according to the third difference; calculating to obtain a subtraction parameter according to the updated minimum standard value; and adjusting the current video frame by using the multiplication parameter and the subtraction parameter.
2. The method of claim 1, wherein said obtaining pixel data for a current video frame comprises:
and acquiring the pixel data of the thumbnail of the current video frame.
3. The method of claim 2, wherein said obtaining pixel data for a thumbnail of the current video frame comprises:
and performing off-screen rendering on the thumbnail of the current video frame to obtain the pixel data.
4. The method of claim 2, wherein said obtaining pixel data for a thumbnail of the current video frame comprises:
and reading and obtaining the pixel data of the thumbnail of the current video frame according to the specified data address.
5. The method of claim 1, wherein said calculating a mean square error of said current video frame based on gray scale values of said pixels comprises:
calculating the difference value of the gray value of each pixel point in the current video frame and the gray value of the corresponding pixel point in the previous video frame to obtain the gray value difference of each pixel point;
and calculating to obtain the mean square error of the current video frame according to the gray value differences.
6. The method of claim 1, wherein the picture-adjusting the current video frame using the multiplication parameter and the subtraction parameter comprises:
calculating the difference value between the current pixel value of each color channel in each pixel point and the subtraction parameter to obtain each second color difference value;
calculating the product of each color difference value and the multiplication parameter to obtain each second color product;
and taking each second color product as the current pixel value of the corresponding color channel.
7. A video quality enhancement apparatus comprising a memory and a processor, the memory having stored thereon a video quality enhancement program executable on the processor, the video quality enhancement program when executed by the processor implementing the steps of the video quality enhancement method according to any one of claims 1 to 6.
8. An apparatus for enhancing video quality, the apparatus comprising:
the pixel data acquisition module is used for acquiring the pixel data of the current video frame;
the gray value calculation module is used for calculating the gray value of each pixel point according to the pixel data;
the mean square error calculation module is used for calculating the mean square error of the current video frame according to the gray value of each pixel point;
the standard gray value selecting module is used for selecting the minimum standard value and the maximum standard value of the gray value according to a preset rule;
the first image quality enhancement module is used for calculating the difference value between the current pixel value of each color channel in each pixel point and the minimum standard value when the mean square error exceeds a preset threshold value to obtain each first color difference value; calculating the product of each color difference value and the maximum standard value to obtain each first color product; taking each first color product as a current pixel value of a corresponding color channel;
the second image quality enhancement module is used for calculating the difference value between the minimum standard value of the current video frame and the minimum standard value of the previous video frame when the mean square error does not exceed the preset threshold value, so as to obtain a first difference value; calculating the difference value between the maximum standard value of the current video frame and the maximum standard value of the previous video frame to obtain a second difference value; updating the minimum standard value of the current video frame by using the first difference value to obtain an updated minimum standard value; updating the maximum standard value of the current video frame by using the second difference value to obtain an updated maximum standard value; calculating the difference value between the updated minimum standard value and the updated maximum standard value to obtain a third difference value; calculating to obtain a multiplication parameter according to the third difference; calculating to obtain a subtraction parameter according to the updated minimum standard value; and adjusting the current video frame by using the multiplication parameter and the subtraction parameter.
9. A computer-readable storage medium having a video quality enhancement program stored thereon, the video quality enhancement program being executable by one or more processors to implement the steps of the video quality enhancement method according to any one of claims 1 to 6.
CN201911319545.8A 2019-12-19 2019-12-19 Video image quality enhancement method and related equipment thereof Active CN110996174B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911319545.8A CN110996174B (en) 2019-12-19 2019-12-19 Video image quality enhancement method and related equipment thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911319545.8A CN110996174B (en) 2019-12-19 2019-12-19 Video image quality enhancement method and related equipment thereof

Publications (2)

Publication Number Publication Date
CN110996174A CN110996174A (en) 2020-04-10
CN110996174B true CN110996174B (en) 2022-04-05

Family

ID=70065774

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911319545.8A Active CN110996174B (en) 2019-12-19 2019-12-19 Video image quality enhancement method and related equipment thereof

Country Status (1)

Country Link
CN (1) CN110996174B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111626949A (en) * 2020-05-15 2020-09-04 上海幕革科技有限公司 Method for improving image quality
CN113687601B (en) * 2020-05-18 2022-11-29 联华电子股份有限公司 Automatic adjustment method of equipment and intelligent adjustment device applying same
CN112055255B (en) * 2020-09-15 2022-07-05 深圳创维-Rgb电子有限公司 Shooting image quality optimization method and device, smart television and readable storage medium
CN114363693B (en) * 2020-10-13 2023-05-12 华为技术有限公司 Image quality adjusting method and device

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5751844A (en) * 1992-04-20 1998-05-12 International Business Machines Corporation Method and apparatus for image acquisition with adaptive compensation for image exposure variation
CN1329873C (en) * 2005-08-22 2007-08-01 上海广电(集团)有限公司中央研究院 Equalizing method for truncating histogram
CN100345160C (en) * 2005-08-22 2007-10-24 上海广电(集团)有限公司中央研究院 Histogram equalizing method for controlling average brightness
TWI327868B (en) * 2006-11-13 2010-07-21 Wintek Corp Image processing method
CN101437169B (en) * 2008-12-19 2010-10-27 深圳市迅雷网络技术有限公司 Method and apparatus for implementing black and white of color image
US8339475B2 (en) * 2008-12-19 2012-12-25 Qualcomm Incorporated High dynamic range image combining
CN102314673B (en) * 2011-08-02 2013-06-05 中国科学院长春光学精密机械与物理研究所 Self-adapting image enhancement method
CN103871029B (en) * 2014-01-28 2017-06-06 西安科技大学 A kind of image enhaucament and dividing method
CN106228935B (en) * 2016-08-19 2019-01-22 青岛海信电器股份有限公司 A kind of method and display device keeping LCD screen brightness uniformity
CN106651817A (en) * 2016-11-03 2017-05-10 电子科技大学成都研究院 Non-sampling contourlet-based image enhancement method
CN110149550B (en) * 2018-06-19 2022-02-11 腾讯科技(深圳)有限公司 Image data processing method and device and storage medium
CN109272459B (en) * 2018-08-20 2020-12-01 Oppo广东移动通信有限公司 Image processing method, image processing device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN110996174A (en) 2020-04-10

Similar Documents

Publication Publication Date Title
CN110996174B (en) Video image quality enhancement method and related equipment thereof
US10783837B2 (en) Driving method and driving device of display device, and related device
CN105279006B (en) Screen capture method and terminal based on Android system
CN109716427A (en) A kind of brightness adjusting method and terminal
CN113126937B (en) Display terminal adjusting method and display terminal
CN112416346B (en) Interface color scheme generation method, device, equipment and storage medium
CN108806638B (en) Image display method and device
CN111080595A (en) Image processing method, image processing device, electronic equipment and computer readable medium
CN116825039B (en) Backlight brightness calculating method, display device and computer readable storage medium
US9007394B2 (en) Method and system for dynamic brightness correction in digital images
CN112788329A (en) Video static frame detection method and device, television and storage medium
CN109147708A (en) Gamma value adjusting method, device and the display equipment of display panel
CN108989872B (en) Android television background fast switching method, framework, server and storage medium
CN112700456A (en) Image area contrast optimization method, device, equipment and storage medium
US10079981B2 (en) Image dynamic range adjustment method, terminal, and storage medium
CN109391855B (en) Method for determining display brightness value and set top box
CN113762016A (en) Key frame selection method and device
CN115775541A (en) Backlight compensation method and device of display screen, chip and terminal
CN108335362B (en) Light control method and device in virtual scene and VR (virtual reality) equipment
CN112215237A (en) Image processing method and device, electronic equipment and computer readable storage medium
CN113409199A (en) Image processing method, image processing device, electronic equipment and computer readable medium
CN113194267B (en) Image processing method and device and photographing method and device
CN109996017B (en) Image adjusting method and terminal thereof
CN113259745B (en) Video playing page processing method and device, electronic equipment and storage medium
CN113132703B (en) Image processing method and apparatus

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