Disclosure of Invention
Objects of the invention
In view of the above problems, the present invention is directed to a backlight brightness compensation method and a display device with high image display effect and high contrast ratio and saving energy.
(II) technical scheme
To achieve the above object, the backlight brightness compensation method of the present invention comprises:
receiving and determining the original gray scale of each pixel according to an input image;
determining backlight brightness according to an input image;
according to a compensation factor fcomPerforming linear compensation on the original gray scale to obtain the compensation gray scale of each pixel, and determining whether the compensation gray scale of each pixel is larger than the maximum gray scale of the display device,
if not, the display gray scale of the pixel is the compensation gray scale;
if so, judging whether the pixel brightness corresponding to the original gray scale of the pixel is less than the backlight brightness,
if so, the display gray scale of the pixel is the compensation gray scale;
if not, the display gray scale of the pixel is determined according to the compensation factor fcomAnd carrying out nonlinear compensation on the original gray scale to obtain the gray scale.
Further, the backlight brightness is determined according to brightness histogram statistics.
Further, the backlight brightness is equal to the pixel brightness corresponding to the gray level bl;
the bl is statistically determined from the luminance histogram by the following formula:
wherein, f (i) is the number of pixels of the ith gray scale, M is the maximum gray scale, and sum is the cumulative sum of the number of the pixels;
Tmto count the threshold factor, sum (bl) is the cumulative sum of the number of pixels when the gray level bl is counted.
Further, the compensation factor is obtained by the steps of:
step S1: judging whether the backlight brightness is larger than a backlight preset value;
if greater, the compensation factor f
comBy passing
The calculation is carried out according to the formula,
if not, judging whether the original gray scale of the pixel is larger than a first preset gray scale or not;
if not, the compensation factor f
comBy passing
Obtaining;
if yes, judging whether the ratio of the pixels with the original gray scale larger than the second preset gray scale to the total pixels is larger than a preset ratio or not,
if so, the compensation factor f
comBy passing
The calculation is carried out according to the formula,
if not, the compensation factor f
comBy passing
Obtaining;
wherein gamma is a correction factor; i ismaxThe maximum original gray level in the input image.
Further, the air conditioner is provided with a fan,
the display gray scale I2When acquired by linear compensation, by I2=I0*fcomObtaining;
the display gray scale I2When acquired by nonlinear compensation, by I2=(I0*fcom-bl)k+ bl is solved;
wherein, the I
0Compensating the coefficients for non-linearly compensating the original gray scale of the pixel
I
0*f
commax is the maximum value of the compensation gray scale of each pixel.
To achieve the above object, the display device of the present invention includes a backlight source and a display panel including a pixel matrix and located on a light-emitting side of the backlight source, and further includes:
the video conversion unit is used for receiving an input image and determining the original gray scale of a pixel;
a backlight brightness determination unit to determine a backlight brightness according to an input image;
a compensation unit for compensatingFactor fcomPerforming linear compensation on the original gray scale to obtain the compensation gray scale of each pixel, and determining whether the compensation gray scale of each pixel is larger than the maximum gray scale of the display device,
if not, the display gray scale of the pixel is the compensation gray scale;
if so, judging whether the pixel brightness corresponding to the original gray scale of the pixel is less than the backlight brightness,
if so, the display gray scale of the pixel is the compensation gray scale;
if not, the display gray scale of the pixel is determined according to the compensation factor fcomCarrying out nonlinear compensation on the original gray scale to obtain a gray scale;
wherein,
the backlight source is connected with the backlight brightness determining unit and used for providing light sources for the display panel according to the backlight brightness;
the display panel is used for outputting images according to the displayed gray scales.
Preferably, the backlight illumination device further comprises a histogram statistic unit for performing luminance histogram statistics, and inputting a backlight luminance determination basis to the backlight luminance unit.
Preferably, the backlight brightness is equal to the pixel brightness corresponding to the gray level bl;
the bl is determined by the histogram statistics unit by the following formula:
wherein, f (i) is the number of pixels of the ith gray scale, M is the maximum gray scale, and sum is the cumulative sum of the number of the pixels;
Tmto count the threshold factor, sum (bl) is the cumulative sum of the number of pixels when the gray level bl is counted.
Preferably, the compensation unit comprises a compensation factor determination module;
the compensation factor determining module is used for judging whether the backlight brightness is greater than a backlight preset value;
if greater, the compensation factor f
comBy passing
The calculation is carried out according to the formula,
if not, judging whether the original gray scale of the pixel is larger than a first preset gray scale or not;
if not, the compensation factor f
comBy passing
Obtaining;
if yes, judging whether the ratio of the pixels with the original gray scale larger than the second preset gray scale to the total pixels is larger than a preset ratio or not,
if so, the compensation factor f
comBy passing
The calculation is carried out according to the formula,
if not, the compensation factor f
comBy passing
Obtaining;
wherein gamma is a correction factor; i ismaxThe maximum original gray level in the input image.
Preferably, the compensation unit further comprises a linear compensation module and a nonlinear compensation module;
the linear compensation module is used for performing linear compensation through I2=I0*fcomObtaining display gray scale I2
The nonlinear compensation module is used for carrying out nonlinear compensation and passes through I2=(I0*fcom-bl)k+ bl to find the display gray scale;
said I
0Compensating the coefficients for non-linearly compensating the original gray scale of the pixel
I
0*f
commax is the maximum value of the compensation gray scale of each pixel.
(III) the backlight brightness compensation method and the display device of the invention have the advantages of
Firstly, the method comprises the following steps: according to the backlight brightness compensation method and the display device, the compensation gray scale after linear compensation is larger than the maximum gray scale of the display device, and the pixel brightness corresponding to the original gray scale is larger than the pixel of the backlight brightness, and nonlinear compensation is adopted to realize backlight brightness compensation. The display gray scale after the nonlinear compensation is adopted does not exceed the maximum gray scale of the display device, so that the amplitude clipping phenomenon caused by gray scale combination is avoided, the display image distortion is small, the display effect is good, the display device is simple and easy, and the structure of the display device is simple;
secondly, the method comprises the following steps: in a conventional display device adopting a partitioned dimming backlight source, the contrast ratio of local backlight brightness control adopting the partitioned dimming is higher and the display effect is better than that of a display device consisting of a traditional global dimming backlight source, but one or more driving circuits and driving sources are additionally arranged in the backlight, so that the cost of the backlight source is high. According to the backlight brightness compensation method and the display device, the brightness compensation combining the linear compensation and the nonlinear compensation is adopted, so that the display effect of an image is better than that of the display device adopting the partition dimming backlight source, and meanwhile, only one backlight source consisting of the backlight driving circuit and the driving source is selected, so that the cost is low;
thirdly, the method comprises the following steps: according to the backlight brightness compensation method and the display device, when the backlight brightness compensation is carried out, the linear compensation or the nonlinear compensation is adopted for the pixels, corresponding to the original gray scale, of which the pixel brightness is larger than the backlight brightness, so that the fact that the actual backlight brightness is not adopted in the traditional method is known that the pixel brightness of the maximum original gray scale corresponding to the backlight brightness is high, the brightness is low, the energy consumption is low, and the energy consumption of the backlight is reduced.
Detailed Description
The first embodiment is as follows:
as shown in fig. 1, the backlight brightness compensation method of the present embodiment includes:
receiving and determining the original gray scale of each pixel according to an input image; specifically, the original gray scales and the corresponding pixel brightness of the three R \ G \ B sub-pixels in each pixel are respectively confirmed according to the input image;
determining backlight brightness according to an input image; the present embodiment is applied to a display device of a 0D backlight (global dimming backlight), the display device includes a pixel matrix, the ideal pixel brightness corresponding to the original gray scale of different pixels is different, and the 0D backlight can only provide uniform brightness, so that one backlight brightness needs to be determined; the backlight source outputs light outwards according to the backlight brightness;
according to a compensation factor fcomPerforming linear compensation on the original gray scale to obtain the compensation gray scale of each pixel, and determining whether the compensation gray scale of each pixel is larger than the maximum gray scale of the display device,
if not, the display gray scale of the pixel is the compensation gray scale;
if so, judging whether the pixel brightness corresponding to the original gray scale of the pixel is less than the backlight brightness,
if so, the display gray scale of the pixel is the compensation gray scale;
if not, the display gray scale of the pixel is determined according to the compensation factor fcomAnd carrying out nonlinear compensation on the original gray scale to obtain the gray scale.
The linear compensation is any one of the linear compensation methods in the prior art, but the linear compensation adopted by all pixels of the whole display device may cause the display gray scale to be larger than the maximum gray scale of the display device, which may result in the gray scale to be merged to generate a clipping phenomenon, the distortion of the output image is large, and the display effect is poor, so in this embodiment, it is determined whether the compensation gray scale is larger than the maximum gray scale. Obtaining a compensation gray scale larger than the maximum gray scale of the display device through judgment, and carrying out nonlinear compensation on pixels, corresponding to the original gray scale, of which the ideal pixel brightness is larger than the maximum backlight brightness; the nonlinear compensation is in line with the principle that the display gray scale after compensation is less than or equal to the maximum gray scale of the display device, so that the clipping phenomenon caused by gray scale combination in the prior art can be effectively overcome, and the display effect of a high-contrast image is particularly good.
As a further improvement of this embodiment, the backlight brightness is statistically determined from a brightness histogram. The brightness histogram is adopted to provide a determination basis for the backlight brightness, and the method has the advantages of simple determination process, small calculation complexity, small calculation amount and the like, and the brightness histogram is relatively mature calculation and is simple and easy to implement.
Further, the backlight brightness is equal to the pixel brightness corresponding to the gray level bl;
the bl is statistically determined from the luminance histogram by the following formula:
wherein, f (i) is the number of pixels of the ith gray scale, M is the maximum gray scale, and sum is the cumulative sum of the number of the pixels;
Tmto count the threshold factor, sum (bl) is the cumulative sum of the number of pixels when the gray level bl is counted. In a specific implementation process, a display device usually displays an image by using a light mixing principle, so each pixel can be further divided into three R \ G \ B sub-pixels, the three sub-pixels have different corresponding gray scales and different corresponding luminances, and when luminance histogram statistics is performed in this embodiment, the gray scale in the pixel is the maximum gray scale corresponding to the original gray scale of the three sub-pixels in the pixel. During statistics, only the pixel with the maximum brightness in one pixel is used for statistics, and compared with all sub-pixels, the statistics and the calculated amount are small, so that the method is simpler, more convenient and quicker to realize; on the other hand, the pixel brightness corresponding to the original gray scale of the sub-pixel with the maximum brightness in the three sub-pixels of R/G/B is selected as the statistic, and compared with the pixel brightness which corresponds to the original gray scale in the three sub-pixels and is the lowest or middle value, the original image information of the input image is reserved to the maximum extent, so that the information loss of the input image is small, and the image display effect is good.
M is the maximum gray scale of the display device, for example, a display device with 8-bit channel comprises 256 gray scales, wherein the maximum gray scale is 255, and M is 255. A10-bit channel display device includes 1024 gray levels, wherein the maximum gray level is 1023, and M is 1023.
TmThe statistical threshold factor is a decimal less than 1, specifically, such as 0.8, 0.9, etc. Generally, the smaller the statistical threshold factor, the smaller the number of statistics, and in this embodiment, the statistics starts from the 0 gray level, that is, the gray level with the smaller required brightness, so the smaller the statistical threshold factor, the smaller the bl obtained by the relative statistics, the lower the backlight brightness determined according to the bl, and thus the power consumption, and thus the statistical threshold factor can also be regarded as the power saving factor.
Therefore, the backlight compensation method has the advantages of low backlight energy consumption and environmental protection.
Further, the compensation factor is obtained by the steps of:
step S1: judging whether the backlight brightness is larger than a backlight preset value; the backlight preset value is preset;
if greater, the compensation factor f
comBy passing
The calculation is carried out according to the formula,
if not, judging whether the original gray scale of the pixel is larger than a first preset gray scale or not;
if not, the compensation factor f
comBy passing
Obtaining;
if yes, judging whether the ratio of the pixels with the original gray scale larger than the second preset gray scale to the total pixels is larger than a preset ratio or not,
if so, the compensation factor f
comBy passing
The calculation is carried out according to the formula,
if not, the compensation factor f
comBy passing
Obtaining;
wherein gamma is a correction factor; i ismaxThe maximum original gray level in the input image. Gamma may be a preset value, and if the display device is a liquid crystal display device, the gamma is equal to the gamma adjustment coefficient of a liquid crystal screen in the liquid crystal display device.
In a specific implementation process, the input images may be classified into a first type of image, a second type of image, and a third type of image; the first type of image is a gray scale corresponding to backlight brightness, the backlight brightness which is determined according to the statistics of the brightness histogram is larger than a backlight preset value, the second type of image is that the backlight brightness value is not larger than the backlight preset value, the original gray scales of all pixels are not larger than the first preset gray scale, and the ratio of the number of the pixels of which the original gray scales are larger than the second preset value to the total number of the pixels of the whole input image is smaller than a preset ratio; the third type of image is an image other than the first type of image and the second type of image, and is generally a high-contrast image in which gray scale merging easily occurs by using a backlight brightness compensation method.
Specifically, the display device is an 8-bit display device, wherein the display device comprises 256 gray scales when displaying images; the backlight preset value is 60 or 80; the first preset value is 240, the second preset value is 230, the gray scale value of the first preset value is usually set to be larger than the second preset value, and the preset ratio is 0.0005 and the like. The value can be set according to the number of pixels of the display device, the requirement of image display effect, the gray scale number and the like in the specific process; specifically, when the display device includes 1024 gray scales, the first preset value is set to 1004, the second preset value is 984, the preset ratio is set to 0.001, and the like.
The compensation factor described in this embodiment has a small complexity in the calculation process, such as calculation for statistics and threshold judgment, and the backlight preset value, the first preset gray scale and the second preset gray scale may be preset, and a manufacturer may adjust the compensation factor according to the requirements of customers, so that the control is flexible and simple.
Further, the display gray scale I2When acquired by linear compensation, by I2=I0*fcomObtaining;
the display gray scale I2When acquired by nonlinear compensation, by I2=(I0*fcom-bl)k+ bl is solved;
wherein, the I
0Compensating the coefficients for non-linearly compensating the original gray scale of the pixel
I
0*f
commax is the maximum value of the compensation gray scale of each pixel.
In the display device, the brightness seen by the viewer is the product of the backlight brightness and the image display brightness, so when the backlight brightness is reduced by n times, if the display brightness is kept constant, the image brightness is increased by n times, the compensation factor is determined according to the backlight brightness, the display gray scale is adjusted according to the compensation factor, thereby ensuring that the brightness of the output image is equal to the brightness required by the input image, and when linear compensation is adopted, the linear compensation is carried out by I2=I0*fcomThe display gray scale is obtained, so the linear compensation can also be called coefficient compensation;
in order to compensate for image distortion formed by combining gray scales due to linear compensation, pixels with the gray scales exceeding the maximum gray scale of the display device are uniformly subjected to nonlinear compensation, so that the display gray scales are controlled within the maximum gray scale of the display device, pixels with different original gray scales still keep gray scale differences through nonlinear compensation, gray scale combination is avoided, and the contrast of a displayed image is improved.
Specifically, fig. 2 is a comparison graph of the mapping relationship of the brightness compensation method of the 8-bit display device; in the figure, a broken line AD is the mapping of the display gray scale and the compensation gray scale calculated by adopting a linear compensation method at the part where the original gray scale is larger than the backlight brightness, a broken line ABC is the mapping of the display gray scale and the original gray scale of the traditional method, the broken line BC section is the part where the gray scales are combined, and a curve AC is the mapping of the display gray scale and the original gray scale calculated by adopting the nonlinear method, all the display gray scales are smaller than or equal to the maximum gray scale 255, and different original gray scales correspond to different display gray scales, so that the gray scale difference is completely presented, and the backlight module has the advantages of good display effect and high contrast.
In summary, the backlight brightness compensation method described in this embodiment has the advantages of good compensation effect, high image contrast, and no amplitude clipping phenomenon due to step combination.
Example two:
as shown in fig. 3 to fig. 4, the display device of the present embodiment includes a backlight and a display panel 2 located at a light-emitting side of the backlight and including a pixel matrix, and further includes:
the video conversion unit 6 is used for receiving an input image and determining the original gray scale of a pixel; receiving an input image, and converting the input image into pixel brightness corresponding to each pixel in a pixel matrix and a displayed original gray scale; the video conversion unit 6 can be a video conversion circuit or an integrated video converter;
a backlight luminance determining unit 4 for determining a backlight luminance from the input image; controlling the brightness of the backlight by adjusting the backlight brightness control value in a specific determination process; the specific physical structure of the backlight brightness determining unit can be a specific logic circuit, or an integrated module integrating hardware and software;
a compensation unit 7 for compensating for the compensation factor fcomCarrying out linear compensation on the original gray scale to obtain each imageCompensating gray scales of the pixels, and judging whether the compensating gray scale of each pixel is larger than the maximum gray scale of the display device, wherein the maximum gray scale of the display device is known, is a hardware parameter of the display device and is directly determined after production, such as 255 or 1023;
if not, the display gray scale of the pixel is the compensation gray scale;
if so, judging whether the pixel brightness corresponding to the original gray scale of the pixel is less than the backlight brightness,
if so, the display gray scale of the pixel is the compensation gray scale;
if not, the display gray scale of the pixel is determined according to the compensation factor fcomCarrying out nonlinear compensation on the original gray scale to obtain a gray scale;
wherein, the backlight source 1 is connected with the backlight determining unit 4 for providing light source to the display panel according to the backlight brightness; typically the backlight comprises a backlight control circuit 3 and a lighting unit 2; the backlight control circuit 3 may preferably be a PWM control circuit, and the light emitting unit includes CCFL (cold cathode tube) or LED (diode) or the like; the backlight source may be of a side-in type as shown in fig. 3, or a direct-type or a mixed structure of the side-in type and the direct-type;
the display panel is used for outputting images according to the displayed gray scales. In a specific implementation process, the display panel is driven by a driving circuit, so a display panel driver 8 is further arranged between the display panel 2 and the compensation unit 7, the display panel driver 8 controls the gray scale of each pixel in the display panel according to the display gray scale output by the compensation unit 7, and then the display of an image is realized through an optical mixing phenomenon under the action of a color film.
The display device has the advantages of simple structure, low backlight energy consumption, no amplitude reduction, good display effect, high contrast and the like.
Preferably, the display device of this embodiment further includes a histogram statistic unit 5, configured to perform luminance histogram statistics, and input a backlight luminance determination criterion to the backlight luminance unit. The histogram statistical unit is a histogram statistical circuit, and performs statistics on the maximum gray-scale value corresponding to the three R \ G \ B sub-pixels to provide a basis for determining the backlight brightness. The histogram statistical unit is simple in hardware implementation and low in cost.
Preferably, the backlight brightness is equal to the pixel brightness corresponding to the gray level bl;
the bl is determined by the histogram statistics unit by the following formula:
wherein, f (i) is the number of pixels with ith gray scale value, M is the maximum gray scale, and sum is the cumulative sum of the number of pixels;
Tmto count the threshold factor, sum (bl) is the cumulative sum of the number of pixels when the gray level bl is counted. The size of M is determined by the parameters of the display device itself, typically 1023 or 255. The histogram statistical unit provides basis for determining the backlight brightness, and the method is simple, convenient and quick to implement and low in hardware cost.
Preferably, the compensation unit comprises a compensation factor determination module;
the compensation factor determining module is used for judging whether the backlight brightness is greater than a backlight preset value;
if greater, the compensation factor fcomBy passingThe calculation is carried out according to the formula,
if not, judging whether the original gray scale of the pixel is larger than a first preset gray scale or not;
if not, the compensation factor f
comBy passing
Obtaining;
if yes, judging whether the ratio of the pixels with the original gray scale larger than the second preset gray scale to the total pixels is larger than a preset ratio or not,
if so, the compensation factor f
comBy passing
The calculation is carried out according to the formula,
if not, the compensation factor f
comBy passing
Obtaining;
wherein γ is a correction factor that is typically preset; i is
maxThe maximum original gray level in the input image. As can be seen from the above, only when the backlight brightness is not greater than the backlight preset value, the original gray scale of the pixel is greater than the first preset gray scale, and the ratio of the pixel greater than the second preset gray scale to the total pixel number of the display device is greater than the preset ratio,
if not, then,
the maximum original gray scales of different input images are different, so that the obtained compensation factors are different, and in the specific implementation process, the I with the higher contrast ismaxThe larger the compensation factor obtained.
Preferably, the compensation unit further comprises a linear compensation module and a nonlinear compensation module;
the linear compensation module is used for performing linear compensation through I2=I0*fcomObtaining display gray scale I2
The nonlinear compensation module is used for carrying out nonlinear compensation and passes through I2=(I0*fcom-bl)k+ bl to find the display gray scale;
said I
0Compensating the coefficients for non-linearly compensating the original gray scale of the pixel
I
0*f
commax is the maximum value of the compensation gray scale of each pixel.
In a specific implementation process, the linear compensation module method and the nonlinear compensation module method are various, and the implementation provides a preferred module and method which are small in algorithm complexity, small in calculation amount, easy to implement and good in display effect. The hardware realization of the linear compensation module and the nonlinear compensation module can be a logic circuit of pure hardware or an integrated module of an electronic device and software, and a specific PLC programmable module or a DSP digital signal processing module or an MCU singlechip processing module and the like.
In a specific implementation process, the backlight brightness determining unit 4, the video converting unit 6, the histogram statistical unit 5, the backlight control circuit 3, the compensating unit 7, and the display panel driver 8 may all be functional modules integrated on an SOC chip; the SOC (System on chip) chip is a system chip and has the advantages of exquisite structure and high intelligence. The display device is preferably a liquid crystal display device, i.e., the display panel constituting the display device is a liquid crystal LCD panel.
The above embodiments are only for illustrating the invention and are not to be construed as limiting the invention, and those skilled in the art can make various changes and modifications without departing from the spirit and scope of the invention, therefore, all equivalent technical solutions also belong to the scope of the invention, and the scope of the invention is defined by the claims.