CN118645065A - Display screen brightness adjustment method and device, storage medium, terminal, and computer program product - Google Patents
Display screen brightness adjustment method and device, storage medium, terminal, and computer program product Download PDFInfo
- Publication number
- CN118645065A CN118645065A CN202410799511.8A CN202410799511A CN118645065A CN 118645065 A CN118645065 A CN 118645065A CN 202410799511 A CN202410799511 A CN 202410799511A CN 118645065 A CN118645065 A CN 118645065A
- Authority
- CN
- China
- Prior art keywords
- brightness
- image block
- target
- gain
- value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 49
- 238000004590 computer program Methods 0.000 title claims abstract description 23
- 238000013507 mapping Methods 0.000 claims abstract description 76
- 230000006870 function Effects 0.000 claims description 151
- 230000015654 memory Effects 0.000 claims description 19
- 238000012885 constant function Methods 0.000 claims description 14
- 230000011218 segmentation Effects 0.000 claims description 14
- 238000012886 linear function Methods 0.000 claims description 7
- 230000000694 effects Effects 0.000 abstract description 16
- 230000000875 corresponding effect Effects 0.000 description 76
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 6
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 6
- 238000004422 calculation algorithm Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 6
- 238000004364 calculation method Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 4
- 230000001360 synchronised effect Effects 0.000 description 4
- 230000009286 beneficial effect Effects 0.000 description 3
- 238000009499 grossing Methods 0.000 description 3
- 230000009467 reduction Effects 0.000 description 3
- 230000007423 decrease Effects 0.000 description 2
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 1
- 241000023320 Luma <angiosperm> Species 0.000 description 1
- 101100438536 Nicotiana plumbaginifolia CABC gene Proteins 0.000 description 1
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 1
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 1
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 230000002596 correlated effect Effects 0.000 description 1
- 230000009191 jumping Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- OSWPMRLSEDHDFF-UHFFFAOYSA-N methyl salicylate Chemical compound COC(=O)C1=CC=CC=C1O OSWPMRLSEDHDFF-UHFFFAOYSA-N 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000007619 statistical method Methods 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
- 230000016776 visual perception Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G3/00—Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes
- G09G3/20—Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters
- G09G3/22—Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources
- G09G3/30—Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources using electroluminescent panels
- G09G3/32—Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources using electroluminescent panels semiconductive, e.g. using light-emitting diodes [LED]
- G09G3/3208—Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources using electroluminescent panels semiconductive, e.g. using light-emitting diodes [LED] organic, e.g. using organic light-emitting diodes [OLED]
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G3/00—Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes
- G09G3/20—Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters
- G09G3/22—Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources
- G09G3/30—Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources using electroluminescent panels
- G09G3/32—Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources using electroluminescent panels semiconductive, e.g. using light-emitting diodes [LED]
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G2320/00—Control of display operating conditions
- G09G2320/06—Adjustment of display parameters
- G09G2320/0626—Adjustment of display parameters for control of overall brightness
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Transforming Electric Information Into Light Information (AREA)
Abstract
一种显示画面的亮度调整方法及装置、存储介质、终端、计算机程序产品,所述方法包括:获取待处理的图像区块,并确定每个图像区块的区块亮度值;至少基于图像区块的区块亮度值,确定图像区块的每个预设的亮度阈值各自对应的目标亮度增益;采用图像区块的各个亮度阈值及其对应的目标亮度增益进行函数拟合,得到亮度‑增益映射函数;对所述图像区块内的每个待调整的目标像素,根据所述亮度‑增益映射函数确定该目标像素对应的目标亮度增益,并采用该目标亮度增益对该目标像素的亮度值进行亮度调整,以确定处理后图像区块;对各个处理后图像区块进行区块拼接,得到调整后的显示画面。上述方案可以在保证画面显示效果的同时,降低显示的功耗。
A method and device for adjusting the brightness of a display screen, a storage medium, a terminal, and a computer program product, the method comprising: obtaining an image block to be processed, and determining a block brightness value of each image block; determining a target brightness gain corresponding to each preset brightness threshold of the image block at least based on the block brightness value of the image block; performing function fitting using each brightness threshold of the image block and its corresponding target brightness gain to obtain a brightness-gain mapping function; for each target pixel to be adjusted in the image block, determining a target brightness gain corresponding to the target pixel according to the brightness-gain mapping function, and performing brightness adjustment on the brightness value of the target pixel using the target brightness gain to determine a processed image block; performing block splicing on each processed image block to obtain an adjusted display screen. The above scheme can reduce the power consumption of the display while ensuring the screen display effect.
Description
技术领域Technical Field
本发明涉及显示技术领域,具体地涉及一种显示画面的亮度调整方法及装置、存储介质、终端、计算机程序产品。The present invention relates to the field of display technology, and in particular to a method and device for adjusting the brightness of a display screen, a storage medium, a terminal, and a computer program product.
背景技术Background Art
当前,大多数高端的电子设备都使用基于有机发光二极管(Organic Light-Emitting Diode,OLED)的显示技术。相比于传统的液晶显示(Liquid-Crystal Display,LCD)技术,OLED具有高亮度,高对比度,色彩鲜艳等优点。目前高端的电子设备都在逐步的从传统的LCD显示过渡到OLED显示。但是,由于OLED的显示特性具有高亮度的特点,所以在某些场景其显示功耗会明显高于LCD。而又由于LCD与OLED的显示原理并不相同,所以之前适用于LCD显示的相关显示算法没有办法直接在OLED显示上进行应用。例如在LCD上用于降低显示功耗的CABC算法。如何在不明显降低显示效果的前提下,降低显示的功耗,延长电子设备的使用时间,是一个重要的应用方向。At present, most high-end electronic devices use display technology based on organic light-emitting diodes (OLED). Compared with traditional liquid crystal display (LCD) technology, OLED has the advantages of high brightness, high contrast, and bright colors. At present, high-end electronic devices are gradually transitioning from traditional LCD display to OLED display. However, due to the high brightness of OLED display characteristics, its display power consumption is significantly higher than LCD in some scenarios. And because the display principles of LCD and OLED are different, the related display algorithms previously applicable to LCD display cannot be directly applied to OLED display. For example, the CABC algorithm used to reduce display power consumption on LCD. How to reduce the display power consumption and extend the use time of electronic devices without significantly reducing the display effect is an important application direction.
现有技术中,提供了一种用于OLED驱动装置的自动限流方法,用于降低OLED的显示功耗。该方法通过获取当前显示的原始图像,计算该图像的平均亮度;根据不同的平均亮度,设定一个亮度增益的下限(即,帧峰值亮度比,该值小于1);然后计算图像中每一个像素的内差(即,RGB三个子像素中,最大的子像素减去最小的子像素的差值);像素内差越大,该像素的亮度降低幅度越大;根据像素的内差和亮度增益建立一个映射关系。由此,对应每个像素,通过计算其内差,可找到对应的亮度增益,然后将该像素的当前亮度值与亮度增益相乘,得到算法处理后的亮度值。In the prior art, an automatic current limiting method for an OLED driving device is provided to reduce the display power consumption of the OLED. The method obtains the original image currently displayed and calculates the average brightness of the image; according to different average brightness, a lower limit of the brightness gain is set (i.e., the frame peak brightness ratio, which is less than 1); then the internal difference of each pixel in the image is calculated (i.e., the difference between the largest sub-pixel and the smallest sub-pixel in the three RGB sub-pixels); the larger the pixel internal difference, the greater the brightness reduction of the pixel; a mapping relationship is established based on the pixel internal difference and the brightness gain. Therefore, for each pixel, by calculating its internal difference, the corresponding brightness gain can be found, and then the current brightness value of the pixel is multiplied by the brightness gain to obtain the brightness value processed by the algorithm.
上述方案的缺点主要有以下几个方面:(1)通过整幅图像的平均亮度设定亮度增益下限。首先,仅通过整幅图像的平均亮度很难反应整幅图像不同区块的亮度情况,例如对于对比度较大的图像,其平均亮度较大,所以根据设定其亮度下降幅度大。但是对于低灰阶像素,过大的降低其亮度对视效有较大的负面影响。而且一幅图像不同的区域亮度情况也不一致,整幅图像的平均亮度并不具备说明性;(2)在计算出亮度增益后,该方法需要对每个像素的RGB子像素乘以增益值进行灰阶调整。极大的增加算法的计算量和复杂度,降低算法处理效率和实时性。The disadvantages of the above scheme are mainly in the following aspects: (1) The lower limit of the brightness gain is set by the average brightness of the entire image. First of all, it is difficult to reflect the brightness of different blocks of the entire image only by the average brightness of the entire image. For example, for an image with a large contrast, its average brightness is large, so its brightness decreases greatly according to the setting. However, for low-grayscale pixels, excessive reduction in their brightness has a significant negative impact on the visual effect. Moreover, the brightness of different areas of an image is not consistent, and the average brightness of the entire image is not indicative; (2) After calculating the brightness gain, this method needs to multiply the RGB sub-pixel of each pixel by the gain value to adjust the grayscale. This greatly increases the amount of calculation and complexity of the algorithm, and reduces the algorithm processing efficiency and real-time performance.
发明内容Summary of the invention
本发明实施例解决的技术问题是如何在保证画面显示效果的同时,降低显示的功耗。The technical problem solved by the embodiment of the present invention is how to reduce the power consumption of display while ensuring the picture display effect.
为解决上述技术问题,本发明实施例提供一种显示画面的亮度调整方法,包括以下步骤:获取待处理的图像区块,并确定每个图像区块的区块亮度值,所述图像区块是对待调整的显示画面进行区块划分得到的;至少基于所述图像区块的区块亮度值,确定所述图像区块的每个预设的亮度阈值各自对应的目标亮度增益,其中,每个图像区块具有预设的多个不同亮度阈值,亮度阈值越大,对应的目标亮度增益越小;采用所述图像区块的各个亮度阈值及其对应的目标亮度增益进行函数拟合,得到所述图像区块的亮度-增益映射函数;对所述图像区块内的每个待调整的目标像素,根据所述亮度-增益映射函数确定该目标像素对应的目标亮度增益,并采用该目标亮度增益对该目标像素的亮度值进行亮度调整,以确定处理后图像区块;对各个处理后图像区块进行区块拼接,得到调整后的显示画面。To solve the above technical problems, an embodiment of the present invention provides a method for adjusting the brightness of a display screen, comprising the following steps: obtaining an image block to be processed, and determining a block brightness value of each image block, wherein the image block is obtained by dividing the display screen to be adjusted into blocks; determining a target brightness gain corresponding to each preset brightness threshold of the image block based at least on the block brightness value of the image block, wherein each image block has a plurality of preset different brightness thresholds, and the larger the brightness threshold, the smaller the corresponding target brightness gain; performing function fitting using each brightness threshold of the image block and its corresponding target brightness gain to obtain a brightness-gain mapping function of the image block; determining, for each target pixel to be adjusted in the image block, a target brightness gain corresponding to the target pixel according to the brightness-gain mapping function, and performing brightness adjustment on the brightness value of the target pixel using the target brightness gain to determine a processed image block; and performing block splicing on each processed image block to obtain an adjusted display screen.
可选的,至少基于所述图像区块的区块亮度值,确定所述图像区块的每个预设的亮度阈值各自对应的目标亮度增益,包括:从预设的亮度区间-亮度增益映射关系表中查找所述图像区块的区块亮度值对应的亮度增益,记为亮度增益下限值,其中,所述亮度区间-亮度增益映射关系表包含多个预先划分的亮度区间与多个预设亮度增益之间的一一对应关系;在所述亮度增益下限值与预设的亮度增益上限值之间,确定包含所述亮度增益下限值在内的多个目标亮度增益,并将所述多个目标亮度增益与所述图像区块的多个不同亮度阈值一一对应;其中,在对所述多个目标亮度增益进行排序之后,数值大小相邻的每两个目标亮度增益之间的差值均落入预设的亮度差值区间。Optionally, at least based on the block brightness value of the image block, determining the target brightness gain corresponding to each preset brightness threshold of the image block, including: searching for the brightness gain corresponding to the block brightness value of the image block from a preset brightness interval-brightness gain mapping relationship table, recorded as the brightness gain lower limit value, wherein the brightness interval-brightness gain mapping relationship table includes a one-to-one correspondence between multiple pre-divided brightness intervals and multiple preset brightness gains; between the brightness gain lower limit value and the preset brightness gain upper limit value, determining multiple target brightness gains including the brightness gain lower limit value, and corresponding the multiple target brightness gains to multiple different brightness thresholds of the image block one by one; wherein, after sorting the multiple target brightness gains, the difference between every two target brightness gains with adjacent numerical values falls within the preset brightness difference interval.
可选的,采用所述图像区块的各个亮度阈值及其对应的目标亮度增益进行函数拟合,得到所述图像区块的亮度-增益映射函数,包括:在所述图像区块的各个亮度阈值中选择至少一个目标亮度阈值;将每个目标亮度阈值及对应的目标亮度增益分别作为单个分段点的横坐标和纵坐标,以得到至少一个分段点;将所述图像区块的各个亮度阈值及其对应的目标亮度增益分别作为拟合点的横坐标和纵坐标,并采用多个预设的目标函数以及各个分段点进行分段函数拟合,得到所述亮度-增益映射函数。Optionally, each brightness threshold value of the image block and its corresponding target brightness gain are used to perform function fitting to obtain a brightness-gain mapping function of the image block, including: selecting at least one target brightness threshold value from each brightness threshold value of the image block; using each target brightness threshold value and its corresponding target brightness gain as the horizontal coordinate and vertical coordinate of a single segmentation point, respectively, to obtain at least one segmentation point; using each brightness threshold value of the image block and its corresponding target brightness gain as the horizontal coordinate and vertical coordinate of a fitting point, respectively, and using multiple preset target functions and each segmentation point to perform piecewise function fitting to obtain the brightness-gain mapping function.
可选的,所述多个预设的目标函数选自:常数函数、一次函数、幂函数。Optionally, the multiple preset objective functions are selected from: a constant function, a linear function, and a power function.
可选的,所述多个预设的目标函数中至少包含两种类型的目标函数;其中,所述亮度-增益映射函数中的首个目标函数为常数函数,其余各个目标函数均为幂函数。Optionally, the multiple preset objective functions include at least two types of objective functions; wherein the first objective function in the brightness-gain mapping function is a constant function, and the remaining objective functions are all power functions.
可选的,所述待调整的目标像素为位于所述图像区块的边缘区域的像素;根据所述亮度-增益映射函数确定该目标像素对应的目标亮度增益,包括:对该目标像素周围预设子区域内的每个像素,分别将各像素的亮度值代入各自所属图像区块的亮度增益映射函数,得到各像素对应的目标亮度增益,其中,所述预设子区域包含与该目标像素所属图像区块的位置相邻的至少一个图像区块的像素;将所述预设子区域内的全部像素对应的各目标亮度增益的加权平均值,作为该目标像素对应的目标亮度增益。Optionally, the target pixel to be adjusted is a pixel located in the edge area of the image block; the target brightness gain corresponding to the target pixel is determined according to the brightness-gain mapping function, including: for each pixel in a preset sub-area around the target pixel, the brightness value of each pixel is substituted into the brightness gain mapping function of the image block to which it belongs, so as to obtain the target brightness gain corresponding to each pixel, wherein the preset sub-area includes pixels of at least one image block adjacent to the position of the image block to which the target pixel belongs; and the weighted average of the target brightness gains corresponding to all pixels in the preset sub-area is used as the target brightness gain corresponding to the target pixel.
可选的,在对各个处理后图像区块进行区块拼接之前,所述方法还包括:对位于所述处理后图像区块的边缘区域的每个目标像素,采用该目标像素周围预设子区域内各像素的调整后亮度值的加权平均值,更新该目标像素的调整后亮度值;其中,所述预设子区域包含与该目标像素所属图像区块的位置相邻的至少一个图像区块的像素。Optionally, before performing block stitching on each processed image block, the method further includes: for each target pixel located in the edge area of the processed image block, updating the adjusted brightness value of the target pixel by taking the weighted average of the adjusted brightness values of each pixel in a preset sub-area around the target pixel; wherein the preset sub-area includes pixels of at least one image block adjacent to the position of the image block to which the target pixel belongs.
可选的,所述亮度-增益映射函数为包含多个目标函数的分段函数,每个目标函数具有各自对应的亮度阈值区间以及对应的预设亮度偏差,相邻的每两个目标函数之间通过分段点连接;所述采用该目标亮度增益对该目标像素的亮度值进行亮度调整,包括:确定该目标像素的亮度值落入的亮度阈值区间,并获取该亮度阈值区间所属目标函数对应的预设亮度偏差,记为目标亮度偏差;计算该目标亮度增益与该目标像素的亮度值的乘积,然后将该乘积与该目标亮度偏差的和,作为该目标像素的调整后亮度值。Optionally, the brightness-gain mapping function is a piecewise function including a plurality of objective functions, each objective function having a corresponding brightness threshold interval and a corresponding preset brightness deviation, and each two adjacent objective functions are connected by a segmentation point; the brightness adjustment of the brightness value of the target pixel using the target brightness gain includes: determining the brightness threshold interval into which the brightness value of the target pixel falls, and obtaining a preset brightness deviation corresponding to the objective function to which the brightness threshold interval belongs, recorded as a target brightness deviation; calculating the product of the target brightness gain and the brightness value of the target pixel, and then taking the sum of the product and the target brightness deviation as the adjusted brightness value of the target pixel.
可选的,在得到所述调整后的显示画面之后,所述方法还包括:对所述调整后的显示画面的每个处理后图像区块,判断其与相邻的前一帧调整后显示画面的同一位置的处理后图像区块的区块亮度值之差,是否大于预设亮度差;如果判断结果为是,则对所述处理后图像区块的每个目标像素,确定所述相邻的前一帧调整后显示画面中的同一位置的目标像素;采用该目标像素对应的目标亮度增益和所述同一位置的目标像素对应的目标亮度增益的平均值,对所述处理后图像区块的该目标像素的调整后亮度值进行二次调整,从而得到二次调整后的显示画面。Optionally, after obtaining the adjusted display picture, the method further includes: for each processed image block of the adjusted display picture, determining whether the difference between the block brightness value of the processed image block at the same position of the adjacent previous frame adjusted display picture and that of the processed image block is greater than a preset brightness difference; if the judgment result is yes, determining, for each target pixel of the processed image block, the target pixel at the same position in the adjacent previous frame adjusted display picture; and performing a secondary adjustment on the adjusted brightness value of the target pixel of the processed image block by using the average value of the target brightness gain corresponding to the target pixel and the target brightness gain corresponding to the target pixel at the same position, thereby obtaining a secondary adjusted display picture.
可选的,所述图像区块内的待调整的像素选自除色度值落入目标色度区间的像素之外的其余像素。Optionally, the pixels to be adjusted in the image block are selected from the remaining pixels except the pixels whose chromaticity values fall within the target chromaticity interval.
可选的,所述图像区块的区块亮度值选自以下任一项:所述图像区块的各像素的平均亮度值、所述图像区块的各像素的最大亮度值、所述图像区块的各像素的最小亮度值。Optionally, the block brightness value of the image block is selected from any one of the following: an average brightness value of each pixel of the image block, a maximum brightness value of each pixel of the image block, and a minimum brightness value of each pixel of the image block.
本发明实施例还提供一种显示画面的亮度调整装置,包括:图像区块获取模块,用于获取待处理的图像区块,并确定每个图像区块的区块亮度值,所述图像区块是对待调整的显示画面进行区块划分得到的;对应关系确定模块,用于至少基于所述图像区块的区块亮度值,确定所述图像区块的每个预设的亮度阈值各自对应的目标亮度增益,其中,每个图像区块具有预设的多个不同亮度阈值,亮度阈值越大,对应的目标亮度增益越小;函数拟合模块,用于采用所述图像区块的各个亮度阈值及其对应的目标亮度增益进行函数拟合,得到所述图像区块的亮度-增益映射函数;图像区块亮度调整模块,用于对所述图像区块内的每个待调整的目标像素,根据所述亮度-增益映射函数确定该目标像素对应的目标亮度增益,并采用该目标亮度增益对该目标像素的亮度值进行亮度调整,以确定处理后图像区块;图像区块拼接模块,用于对各个处理后图像区块进行区块拼接,得到调整后的显示画面。The embodiment of the present invention further provides a brightness adjustment device for a display screen, comprising: an image block acquisition module, used to acquire an image block to be processed, and determine a block brightness value of each image block, wherein the image block is obtained by dividing the display screen to be adjusted into blocks; a corresponding relationship determination module, used to determine, based at least on the block brightness value of the image block, a target brightness gain corresponding to each preset brightness threshold of the image block, wherein each image block has a plurality of preset different brightness thresholds, and the larger the brightness threshold, the smaller the corresponding target brightness gain; a function fitting module, used to perform function fitting using each brightness threshold of the image block and its corresponding target brightness gain, to obtain a brightness-gain mapping function of the image block; an image block brightness adjustment module, used to determine, for each target pixel to be adjusted in the image block, a target brightness gain corresponding to the target pixel according to the brightness-gain mapping function, and perform brightness adjustment on the brightness value of the target pixel using the target brightness gain, to determine a processed image block; and an image block splicing module, used to perform block splicing on each processed image block, to obtain an adjusted display screen.
本发明实施例还提供一种存储介质,其上存储有计算机程序,所述计算机程序被处理器运行时执行上述显示画面的亮度调整方法的步骤。An embodiment of the present invention further provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned method for adjusting the brightness of a display screen are executed.
本发明实施例还提供一种终端,包括存储器和处理器,所述存储器上存储有能够在所述处理器上运行的计算机程序,所述处理器运行所述计算机程序时执行上述显示画面的亮度调整方法的步骤。An embodiment of the present invention further provides a terminal, including a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and the processor executes the steps of the above-mentioned display screen brightness adjustment method when running the computer program.
本发明实施例还提供一种计算机程序产品,包括计算机程序,所述计算机程序被处理器运行时上述显示画面的亮度调整方法的步骤。An embodiment of the present invention further provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned method for adjusting the brightness of a display screen are performed.
与现有技术相比,本发明实施例的技术方案具有以下有益效果:Compared with the prior art, the technical solution of the embodiment of the present invention has the following beneficial effects:
相较于现有技术以整张图像(或显示画面)为粒度确定全局平均亮度,并根据全局平均亮度确定亮度增益的下限值,以及像素内差-亮度增益映射关系,在本发明实施例中,通过将待调整的显示画面划分为若干独立的图像区块,以图像区块为粒度确定亮度-亮度增益之间的映射函数,以对各区块的像素分别进行亮度调整,可以获得更好精细化的亮度调整效果,在改善画面显示效果的同时降低显示的功耗。进一步,本发明实施例中映射关系的确定无需计算每个像素的像素内差,而是直接采用每个区块各自预设的多个不同亮度阈值与亮度增益进行映射,可以显著减小计算量和计算复杂度,提高亮度调整效率和实时性。Compared with the prior art that determines the global average brightness with the whole image (or display screen) as the granularity, and determines the lower limit of the brightness gain and the pixel internal difference-brightness gain mapping relationship based on the global average brightness, in the embodiment of the present invention, by dividing the display screen to be adjusted into a number of independent image blocks, the mapping function between brightness and brightness gain is determined with the image block as the granularity, so as to adjust the brightness of the pixels of each block respectively, a better and more refined brightness adjustment effect can be obtained, and the power consumption of the display can be reduced while improving the picture display effect. Furthermore, in the embodiment of the present invention, the determination of the mapping relationship does not need to calculate the pixel internal difference of each pixel, but directly uses a plurality of different brightness thresholds preset for each block and the brightness gain for mapping, which can significantly reduce the amount of calculation and the complexity of calculation, and improve the efficiency and real-time performance of brightness adjustment.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1是本发明实施例中一种显示画面的亮度调整方法的流程图;FIG1 is a flow chart of a method for adjusting brightness of a display screen according to an embodiment of the present invention;
图2是图1中步骤S12的一种具体实施方式的流程图;FIG2 is a flow chart of a specific implementation of step S12 in FIG1 ;
图3是图1中步骤S13的一种具体实施方式的流程图;FIG3 is a flow chart of a specific implementation of step S13 in FIG1 ;
图4是本发明实施例中一种亮度-增益映射函数的曲线示意图;FIG4 is a schematic diagram of a curve of a brightness-gain mapping function according to an embodiment of the present invention;
图5是图1中步骤S14的一种具体实施方式的流程图;FIG5 is a flow chart of a specific implementation of step S14 in FIG1 ;
图6是本发明实施例中调整前的亮度值与调整后亮度值的映射曲线示意图;6 is a schematic diagram of a mapping curve between a brightness value before adjustment and a brightness value after adjustment according to an embodiment of the present invention;
图7是本发明实施例中另一种显示画面的亮度调整方法的部分流程图;7 is a partial flow chart of another method for adjusting the brightness of a display screen according to an embodiment of the present invention;
图8是本发明实施例中一种显示画面的亮度调整装置的结构示意图。FIG. 8 is a schematic structural diagram of a device for adjusting brightness of a display screen according to an embodiment of the present invention.
具体实施方式DETAILED DESCRIPTION
为使本发明的上述目的、特征和有益效果能够更为明显易懂,下面结合附图对本发明的具体实施例做详细说明。In order to make the above-mentioned objects, features and beneficial effects of the present invention more obvious and easy to understand, specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
参照图1,图1是本发明实施例中一种显示画面的亮度调整方法的流程图。所述方法可以应用于具有图像处理功能的终端或电子设备,例如可以选自但不限于计算机、手机、平板电脑、电视机、智能可穿戴设备(比如智能手表)、车载式终端等等。所述终端可以为基于有机发光二极管(Organic Light-Emitting Diode,简称OLED)、迷你发光二极管(miniLight-Emitting Eiode,简称mini-LED)以及微型发光二极管(micro Light-EmittingEiode,简称micro-LED)等显示技术的终端。Referring to FIG. 1 , FIG. 1 is a flow chart of a method for adjusting the brightness of a display screen in an embodiment of the present invention. The method can be applied to a terminal or electronic device with an image processing function, for example, selected from but not limited to computers, mobile phones, tablet computers, televisions, smart wearable devices (such as smart watches), vehicle-mounted terminals, etc. The terminal can be a terminal based on display technologies such as organic light-emitting diodes (OLED), mini light-emitting diodes (mini-LED), and micro light-emitting diodes (micro-LED).
所述方法可以包括步骤S11至步骤S15:The method may include steps S11 to S15:
步骤S11:获取待处理的图像区块,并确定每个图像区块的区块亮度值,所述图像区块是对待调整的显示画面进行区块划分得到的;Step S11: obtaining image blocks to be processed, and determining a block brightness value of each image block, wherein the image blocks are obtained by dividing the display image to be adjusted into blocks;
步骤S12:至少基于所述图像区块的区块亮度值,确定所述图像区块的每个预设的亮度阈值各自对应的目标亮度增益,其中,每个图像区块具有预设的多个不同亮度阈值,亮度阈值越大,对应的目标亮度增益越小;Step S12: determining a target brightness gain corresponding to each preset brightness threshold of the image block based at least on the block brightness value of the image block, wherein each image block has a plurality of preset different brightness thresholds, and a larger brightness threshold has a smaller corresponding target brightness gain;
步骤S13:采用所述图像区块的各个亮度阈值及其对应的目标亮度增益进行函数拟合,得到所述图像区块的亮度-增益映射函数;Step S13: performing function fitting using each brightness threshold of the image block and its corresponding target brightness gain to obtain a brightness-gain mapping function of the image block;
步骤S14:对所述图像区块内的每个待调整的目标像素,根据所述亮度-增益映射函数确定该目标像素对应的目标亮度增益,并采用该目标亮度增益对该目标像素的亮度值进行亮度调整,以确定处理后图像区块;Step S14: for each target pixel to be adjusted in the image block, determine the target brightness gain corresponding to the target pixel according to the brightness-gain mapping function, and use the target brightness gain to perform brightness adjustment on the brightness value of the target pixel to determine the processed image block;
步骤S15:对各个处理后图像区块进行区块拼接,得到调整后的显示画面。Step S15: performing block splicing on each processed image block to obtain an adjusted display image.
在步骤S11的具体实施中,所述待调整的显示画面可以是终端的显示屏在某一时刻显示的画面帧或图像帧。获取所述待调整的显示画面的方式可以有很多种,本发明实施例对此不做限定。例如可以通过截图线程读取帧缓冲区(Frame Buffer)中的数据,将数据保存为一张屏幕截图,即为所述待调整的显示画面。由于帧缓冲区提供接口将显示设备抽象为帧缓冲区,因此通过将合成后的画面帧写入帧缓冲区,即可在终端的显示屏显示该画面。通过读取Frame Buffer中的数据(该数据主要包含画面中像素的各通道信息,例如R通道、G通道以及B通道的信息),可以实现对显示屏当前显示画面进行截图。In the specific implementation of step S11, the display screen to be adjusted may be a picture frame or an image frame displayed on the display screen of the terminal at a certain moment. There may be many ways to obtain the display screen to be adjusted, which is not limited in the embodiment of the present invention. For example, the data in the frame buffer (Frame Buffer) may be read through a screenshot thread, and the data may be saved as a screen shot, which is the display screen to be adjusted. Since the frame buffer provides an interface to abstract the display device as a frame buffer, the screen may be displayed on the display screen of the terminal by writing the synthesized screen frame into the frame buffer. By reading the data in the Frame Buffer (the data mainly includes the channel information of each pixel in the screen, such as the information of the R channel, the G channel, and the B channel), it is possible to screenshot the current display screen of the display screen.
可以理解的是,一帧画面的不同区域的亮度信息、颜色信息等往往存在区别,如果只计算整幅画面的平均亮度信息或平均颜色信息,难以准确地反映出画面不同位置的具体情况,因此也难以对不同位置的亮度进行精准、合理调整。为解决前述问题,本申请在获取所述待调整的显示画面后,对该显示画面进行分区块处理,例如通过将整个画面划分为X个图像区块(X为正整数),将每个图像区块看作是一个单独的小图像,进行独立的算法处理。本发明实施例对划分的图像区块的数量、形状等不做限定,可以结合实际应用场景需要适当设置。通常划分的图像区块的数目越多,画面亮度调整的效果越好,但同时带来的硬件开销越大。It is understandable that the brightness information, color information, etc. of different areas of a frame are often different. If only the average brightness information or average color information of the entire picture is calculated, it is difficult to accurately reflect the specific conditions of different positions of the picture, and therefore it is difficult to accurately and reasonably adjust the brightness of different positions. To solve the aforementioned problems, after obtaining the display picture to be adjusted, the present application performs block processing on the display picture, for example, by dividing the entire picture into X image blocks (X is a positive integer), and treating each image block as a separate small image, and performing independent algorithm processing. The embodiment of the present invention does not limit the number and shape of the divided image blocks, and can be appropriately set according to the needs of the actual application scenario. Generally, the more the number of divided image blocks, the better the effect of picture brightness adjustment, but at the same time, the greater the hardware overhead.
具体地,所述图像区块的区块亮度值选自以下任一项;所述图像区块的各像素的平均亮度值、所述图像区块的各像素的最大亮度值、所述图像区块的各像素的最小亮度值。Specifically, the block brightness value of the image block is selected from any one of the following: an average brightness value of each pixel of the image block, a maximum brightness value of each pixel of the image block, and a minimum brightness value of each pixel of the image block.
在具体实施中,如果所述待调整的显示画面的格式是RGB格式,其亮度和色度信息混叠在一起,需要将RGB格式的图像转换为HSV格式或YUV格式,其中,对于HSV格式图像,H表示色度(Hue)、S表示饱和度(Saturation)、V表示明度(即,亮度Value);对于YUV格式图像,Y表示亮度(Luminance或Luma),也就是灰阶值,U和V表示的则是色度(Chrominance或Chroma),用于描述图像色彩及饱和度)。通过格式转化,可以分离色度和亮度信息。In a specific implementation, if the format of the display image to be adjusted is RGB format, its brightness and chromaticity information are mixed together, and the image in RGB format needs to be converted into HSV format or YUV format, where, for HSV format images, H represents hue, S represents saturation, and V represents brightness (i.e., brightness Value); for YUV format images, Y represents luminance (Luminance or Luma), that is, grayscale value, and U and V represent chromaticity (Chrominance or Chroma, used to describe image color and saturation). Through format conversion, chromaticity and brightness information can be separated.
在具体实施中,对于每个图像区块,可以采用直方图统计方法,统计图像区块中各像素的亮度值,得到亮度统计直方图,从亮度统计直方图中可以获知落入每个亮度统计区间的像素数量。基于亮度统计直方图,可以方便、快速地计算得到对应图像区块的各像素的平均亮度值和/或最大亮度值和/或最小亮度值。本发明实施例对于亮度统计区间(bin)的数量和划分方式不做限定,但为了保证计算出的区块亮度值信息足够准确,Bin的数目不宜过少。In a specific implementation, for each image block, a histogram statistical method can be used to count the brightness values of each pixel in the image block to obtain a brightness statistical histogram, from which the number of pixels falling into each brightness statistical interval can be known. Based on the brightness statistical histogram, the average brightness value and/or the maximum brightness value and/or the minimum brightness value of each pixel in the corresponding image block can be conveniently and quickly calculated. The embodiment of the present invention does not limit the number and division method of the brightness statistical interval (bin), but in order to ensure that the calculated block brightness value information is sufficiently accurate, the number of Bins should not be too small.
在步骤S12的具体实施中,每个图像区块的预设的多个不同亮度阈值可以采用下述方式确定:根据所述图像区块的位宽确定亮度极值,在0至所述亮度极值的区间内划分N+1个亮度阈值区间,则N个划分点即作为该图像区块对应的多个不同亮度阈值。例如,所述图像区块的位宽为8bits,则亮度极值为28-1=255,对[0,255]划分为N+1个亮度阈值区间:[0,thr1],(thr1,thr2],(thr2,thr3]……(thrn,255],则该图像区块对应的N个亮度阈值分别为:thr1,thr2,thr3……thrn。In the specific implementation of step S12, the preset multiple different brightness thresholds of each image block can be determined in the following manner: determine the brightness extreme value according to the bit width of the image block, divide N+1 brightness threshold intervals in the interval from 0 to the brightness extreme value, and then the N division points are used as the multiple different brightness thresholds corresponding to the image block. For example, if the bit width of the image block is 8 bits, the brightness extreme value is 2 8 -1=255, and [0,255] is divided into N+1 brightness threshold intervals: [0, thr 1 ], (thr 1 , thr 2 ], (thr 2 , thr 3 ] ... (thr n , 255], then the N brightness thresholds corresponding to the image block are: thr 1 , thr 2 , thr 3 ... thr n .
其中,N+1个亮度阈值区间的划分方式可以是平均划分,也可以是非平均划分,换言之,各亮度阈值区间的最大亮度与最小亮度之差可以相同,也可以不同。可以理解的是,亮度阈值区间划分的数量越多,亮度阈值数量也相应越多,后续进行函数拟合的数据量也就越多,拟合精度越高。但亮度阈值区间数量不宜过多,否则会增加运算开销。Among them, the division method of N+1 brightness threshold intervals can be average division or non-average division. In other words, the difference between the maximum brightness and the minimum brightness of each brightness threshold interval can be the same or different. It can be understood that the more the number of brightness threshold interval divisions, the more the number of brightness thresholds, the more data for subsequent function fitting, and the higher the fitting accuracy. However, the number of brightness threshold intervals should not be too many, otherwise it will increase the computational overhead.
本申请中,对目标亮度增益的取值范围不做特别限定。需要说明的是,如果目标亮度增益的范围在0~1之间,像素的原始亮度值乘以目标亮度增益后,亮度会降低,如果目标亮度增益大于1,像素的原始亮度值乘以目标亮度增益后,亮度会提升。在确定各亮度阈值对应的目标亮度增益的过程中,需要结合画面显示效果和显示的功耗需求,对不同的亮度阈值对应设置对应的目标亮度增益。In this application, the value range of the target brightness gain is not particularly limited. It should be noted that if the target brightness gain ranges between 0 and 1, the brightness will decrease after the original brightness value of the pixel is multiplied by the target brightness gain. If the target brightness gain is greater than 1, the brightness will increase after the original brightness value of the pixel is multiplied by the target brightness gain. In the process of determining the target brightness gain corresponding to each brightness threshold, it is necessary to set the corresponding target brightness gain for different brightness thresholds in combination with the picture display effect and the power consumption requirement of the display.
参照图2,图2是图1中步骤S12的一种具体实施方式的流程图。本实施方式中,所述步骤S12可以包括步骤S121至S122。Referring to Fig. 2, Fig. 2 is a flowchart of a specific implementation of step S12 in Fig. 1. In this implementation, step S12 may include steps S121 to S122.
在步骤S121中,从预设的亮度区间-亮度增益映射关系表中查找所述图像区块的区块亮度值对应的亮度增益,记为亮度增益下限值,其中,所述亮度区间-亮度增益映射关系表包含多个预先划分的亮度区间与多个预设亮度增益之间的一一对应关系。In step S121, the brightness gain corresponding to the block brightness value of the image block is searched from a preset brightness interval-brightness gain mapping relationship table and recorded as the brightness gain lower limit value, wherein the brightness interval-brightness gain mapping relationship table includes a one-to-one correspondence between multiple pre-divided brightness intervals and multiple preset brightness gains.
在步骤S122中,在所述亮度增益下限值与预设的亮度增益上限值之间,确定包含所述亮度增益下限值在内的多个目标亮度增益,并将所述多个目标亮度增益与所述图像区块的多个不同亮度阈值一一对应。In step S122, a plurality of target brightness gains including the brightness gain lower limit value are determined between the brightness gain lower limit value and a preset brightness gain upper limit value, and the plurality of target brightness gains are matched one-to-one with a plurality of different brightness thresholds of the image block.
其中,在对所述多个目标亮度增益进行排序之后,数值大小相邻的每两个目标亮度增益之间的差值均落入预设的亮度差值区间。After the plurality of target brightness gains are sorted, the difference between every two target brightness gains with adjacent numerical values falls within a preset brightness difference interval.
在具体实施中,所述多个预先划分的亮度区间也可以是在0至亮度极值的区间内划分得到的多个亮度区间,亮度极值的确定方法参照前文描述,此处不赘述。其中,亮度区间的划分方法可以是平均划分,也可以是非平均划分。In a specific implementation, the plurality of pre-divided brightness intervals may also be a plurality of brightness intervals obtained by dividing the interval from 0 to the brightness extreme value, and the method for determining the brightness extreme value is described above and will not be repeated here. The brightness interval division method may be an average division or an uneven division.
以下举例说明一种确定图像区块的各个亮度阈值对应的目标亮度增益的方法。如下表1,示出了一种亮度区间-亮度增益映射关系表(表1中的数据仅用来举例说明,不构成对实际数值的限定)。例如,当图像区块的区块亮度值(例如,平均亮度值)处于亮度区间240-255时,对应的亮度增益下限值gain(n)=0.62;当图像区块的区块亮度值处于亮度区间220-240时,对应的亮度增益下限值gain(n)=0.66。The following example illustrates a method for determining the target brightness gain corresponding to each brightness threshold of an image block. Table 1 below shows a brightness interval-brightness gain mapping relationship table (the data in Table 1 are only used for illustration and do not constitute a limitation on the actual values). For example, when the block brightness value (e.g., average brightness value) of the image block is in the brightness interval of 240-255, the corresponding brightness gain lower limit value gain(n)=0.62; when the block brightness value of the image block is in the brightness interval of 220-240, the corresponding brightness gain lower limit value gain(n)=0.66.
在确定亮度增益下限值后,在所述亮度增益下限值与预设的亮度增益上限值之间,确定包含所述亮度增益下限值在内的多个目标亮度增益(分记为:gain(n),gain(n-1)……,gain(3),gain(2),gain(1)),并将所述多个目标亮度增益与所述图像区块的多个不同亮度阈值一一对应,亮度阈值越大,对应的目标亮度增益越小(即,亮度阈值与目标亮度增益呈负相关关系);其中,在对所述多个目标亮度增益进行排序之后,数值大小相邻的每两个目标亮度增益之间的差值均落入预设的亮度差值区间。After determining the brightness gain lower limit value, a plurality of target brightness gains (recorded as: gain(n), gain(n-1)..., gain(3), gain(2), gain(1)) including the brightness gain lower limit value are determined between the brightness gain lower limit value and the preset brightness gain upper limit value, and the plurality of target brightness gains are corresponded one by one to a plurality of different brightness thresholds of the image block, wherein the larger the brightness threshold value, the smaller the corresponding target brightness gain (i.e., the brightness threshold value and the target brightness gain are negatively correlated); wherein, after sorting the plurality of target brightness gains, the difference between each two target brightness gains having adjacent numerical values falls within a preset brightness difference interval.
作为一个非限制性实施例,所述预设的亮度增益上限值为1,则各个目标亮度增益满足:0<gain(n)≤gain(n-1)……≤gain(2)≤gain(1)≤1,数值大小相邻的每两个目标亮度增益gain(n-1)-gain(n)的差值落入预设的亮度差值区间。As a non-limiting embodiment, the preset upper limit value of the brightness gain is 1, then each target brightness gain satisfies: 0<gain(n)≤gain(n-1)……≤gain(2)≤gain(1)≤1, and the difference between every two adjacent target brightness gains gain(n-1)-gain(n) falls within the preset brightness difference range.
表1亮度区间-亮度增益映射关系表Table 1 Brightness range-brightness gain mapping relationship table
可以理解的是,在亮度阈值与目标亮度增益呈负相关关系的基础上,相较于随机确定各个亮度阈值对应的目标亮度增益,或者在亮度增益下限值与预设的亮度增益上限值之间随机确定多个具有数值大小顺序的目标亮度增益,本实施方案通过设置亮度差值区间,并限定排序后数值大小相邻的每两个目标亮度增益之间的差值均落入所述亮度差值区间。如此,可以避免数值大小相邻的每两个目标亮度增益之间的数值相差太大,导致显示画面亮度调整的均衡性降低,影响画面显示效果。It can be understood that, based on the negative correlation between the brightness threshold and the target brightness gain, compared with randomly determining the target brightness gain corresponding to each brightness threshold, or randomly determining multiple target brightness gains with numerical order between the brightness gain lower limit and the preset brightness gain upper limit, this embodiment sets a brightness difference interval, and limits the difference between each two target brightness gains with adjacent numerical values after sorting to fall into the brightness difference interval. In this way, it can be avoided that the numerical difference between each two target brightness gains with adjacent numerical values is too large, resulting in a reduction in the balance of the display screen brightness adjustment and affecting the screen display effect.
在步骤S13的具体实施中,采用所述图像区块的各个亮度阈值及其对应的目标亮度增益进行函数拟合,得到所述图像区块的亮度-增益映射函数。In the specific implementation of step S13, each brightness threshold value of the image block and its corresponding target brightness gain are used to perform function fitting to obtain a brightness-gain mapping function of the image block.
在第一种具体实施方式中,可以采用单种目标函数进行整段函数拟合,得到所述图像区块的亮度-增益映射函数。所述整段函数例如可以选自常数函数、一次函数等任一种。In a first specific implementation, a single objective function may be used to perform whole-segment function fitting to obtain the brightness-gain mapping function of the image block. The whole-segment function may be selected from any one of a constant function, a linear function, and the like.
在第二种具体实施方式中,可以采用单种目标函数进行分段函数拟合,得到所述图像区块的亮度-增益映射函数,即,所述亮度-增益映射函数的每个分段函数均为相同类型的目标函数。所述单种目标函数例如可以选自常数函数、一次函数等任一种。In a second specific implementation, a single objective function may be used to perform piecewise function fitting to obtain the brightness-gain mapping function of the image block, that is, each piecewise function of the brightness-gain mapping function is an objective function of the same type. The single objective function may be selected from, for example, any one of a constant function and a linear function.
在第三种具体实施方式中,可以采用多个预设的目标函数进行分段函数拟合,得到所述图像区块的亮度-增益映射函数;其中,所述多个预设的目标函数中至少包含两种类型的目标函数,例如可以选自常数函数、一次函数、幂函数等中的至少两种函数。In a third specific implementation, multiple preset objective functions can be used to perform piecewise function fitting to obtain the brightness-gain mapping function of the image block; wherein the multiple preset objective functions include at least two types of objective functions, for example, at least two functions selected from a constant function, a linear function, a power function, etc.
以下结合图3具体说明进行分段函数拟合得到所述亮度-增益映射函数的方法。The method of obtaining the brightness-gain mapping function by performing piecewise function fitting is described in detail below in conjunction with FIG. 3 .
参照图3,图3是图1中步骤S13的一种具体实施方式的流程图。本实施方式中,所述步骤S13可以包括步骤S131至S133。Referring to Fig. 3, Fig. 3 is a flowchart of a specific implementation of step S13 in Fig. 1. In this implementation, step S13 may include steps S131 to S133.
在步骤S131中,在所述图像区块的各个亮度阈值中选择至少一个目标亮度阈值。In step S131 , at least one target brightness threshold is selected from each brightness threshold of the image block.
在步骤S132中,将每个目标亮度阈值及对应的目标亮度增益分别作为单个分段点的横坐标和纵坐标,以得到至少一个分段点。In step S132, each target brightness threshold and the corresponding target brightness gain are used as the abscissa and ordinate of a single segmentation point, respectively, to obtain at least one segmentation point.
可以理解的是,选择的目标亮度阈值越多,所述亮度-增益映射函数的分段点越多,后续采用亮度-增益映射函数进行亮度增益映射及亮度调整的精细程度越高。It can be understood that the more target brightness thresholds are selected, the more segmentation points of the brightness-gain mapping function are, and the higher the precision of the subsequent brightness gain mapping and brightness adjustment using the brightness-gain mapping function.
在步骤S133中,将所述图像区块的各个亮度阈值及其对应的目标亮度增益分别作为拟合点的横坐标和纵坐标,并采用多个预设的目标函数以及各个分段点进行分段函数拟合,得到所述亮度-增益映射函数。In step S133, each brightness threshold value of the image block and its corresponding target brightness gain are used as the horizontal coordinate and the vertical coordinate of the fitting point respectively, and a plurality of preset target functions and each segmentation point are used to perform piecewise function fitting to obtain the brightness-gain mapping function.
其中,所述多个预设的目标函数可以选自但不限于:常数函数、一次函数、幂函数。The plurality of preset objective functions may be selected from, but not limited to, a constant function, a linear function, and a power function.
具体地,所述多个预设的目标函数中至少包含两种类型的目标函数;其中,所述亮度-增益映射函数中的首个目标函数为常数函数,其余各个目标函数均为幂函数。所述首个目标函数是亮度值在0至最小目标亮度阈值的范围内对应的目标函数。Specifically, the plurality of preset objective functions include at least two types of objective functions, wherein the first objective function in the brightness-gain mapping function is a constant function, and the remaining objective functions are all power functions. The first objective function is an objective function corresponding to a brightness value within a range from 0 to a minimum target brightness threshold.
具体地,可以采用下述公式表示所述亮度-增益映射函数:Specifically, the brightness-gain mapping function can be expressed by the following formula:
其中,Gain表示所述亮度-增益映射函数,V表示幂函数的自变量,即像素的亮度值(具体指像素的原始亮度值或调整前亮度值),a1~an分别表示第1~n段幂函数的第一系数,b1~bn分别表示第1~n段幂函数的第二系数,c1~cn分别表示第1~n段幂函数的第三系数,k1~kn分别为预设的常数,用于表示第1~n段幂函数的幂,gain0表示亮度增益常量,thr1′~thrn′分别表示第1~n个目标亮度阈值。作为一个非限制性示例,所述亮度增益常量gain0可以为所述图像区块的最小亮度阈值对应的目标亮度增益gain(1)。Wherein, Gain represents the brightness-gain mapping function, V represents the independent variable of the power function, i.e., the brightness value of the pixel (specifically, the original brightness value of the pixel or the brightness value before adjustment), a 1 to a n represent the first coefficients of the power functions of the 1st to nth segments, b 1 to b n represent the second coefficients of the power functions of the 1st to nth segments, c 1 to c n represent the third coefficients of the power functions of the 1st to nth segments, k 1 to k n are preset constants for representing the powers of the power functions of the 1st to nth segments, gain 0 represents a brightness gain constant, and thr 1 ′ to thr n ′ represent the 1st to nth target brightness thresholds. As a non-limiting example, the brightness gain constant gain 0 may be the target brightness gain gain(1) corresponding to the minimum brightness threshold of the image block.
其中,k1~kn可以相同或不同。作为一个非限制性示例,k1~kn可以选自区间(1,2],例如1.2。Wherein, k 1 ~k n may be the same or different. As a non-limiting example, k 1 ~k n may be selected from the interval (1, 2], such as 1.2.
参照图4,图4是本发明实施例中一种亮度-增益映射函数的曲线示意图。Referring to FIG. 4 , FIG. 4 is a schematic diagram of a curve of a brightness-gain mapping function according to an embodiment of the present invention.
本示例中,仅示意性展示两个分段点(thrx,gainx)和(thry,gainy),其中,坐标轴的横坐标表示亮度阈值,纵坐标表示目标亮度增益,thrx和thry为作为示例的两个亮度阈值,gainx和gainy为对应的目标亮度增益。从图中可见,在亮度阈值区间[0,thrx]对应的目标函数为常数函数Gain=gain0,在亮度阈值区间(thrx,thry]和亮度阈值区间(thry,255]对应的目标函数均为幂函数。在本发明实施例中,采用上述至少包含两种类型目标函数的分段函数进行亮度增益映射,且其中一种目标函数为幂函数,另一种目标函数为常数函数,相较于采用简单的整段直线映射函数或由多段常数函数构成的阶梯状分段函数进行映射,本实施方案的映射函数更加符合人眼的视觉感知,能取得更好的画面亮度调整及显示效果。In this example, only two segmentation points (thr x , gain x ) and (thr y , gain y ) are schematically shown, wherein the abscissa of the coordinate axis represents the brightness threshold, the ordinate represents the target brightness gain, thr x and thr y are two brightness thresholds as examples, and gain x and gain y are the corresponding target brightness gains. As can be seen from the figure, the target function corresponding to the brightness threshold interval [0, thr x ] is a constant function Gain=gain 0 , and the target functions corresponding to the brightness threshold interval (thr x , thr y ] and the brightness threshold interval (thr y , 255] are both power functions. In an embodiment of the present invention, the above-mentioned piecewise function including at least two types of target functions is used to perform brightness gain mapping, and one of the target functions is a power function and the other target function is a constant function. Compared with the use of a simple whole-segment straight line mapping function or a stepped piecewise function composed of multiple constant functions for mapping, the mapping function of this implementation scheme is more in line with the visual perception of the human eye and can achieve better picture brightness adjustment and display effects.
继续参照图1,在步骤S14的具体实施中,所述图像区块内的待调整的目标像素可以是所述图像区块内的全部像素,也可以是一部分像素,例如可以选自除色度值落入目标色度区间的像素之外的其余像素。待调整的目标像素的亮度值具体指目标像素的原始亮度值(或调整前亮度值)。Continuing to refer to FIG. 1 , in the specific implementation of step S14, the target pixels to be adjusted in the image block may be all pixels in the image block, or may be a portion of pixels, for example, pixels other than pixels whose chromaticity values fall within the target chromaticity interval. The brightness value of the target pixel to be adjusted specifically refers to the original brightness value (or brightness value before adjustment) of the target pixel.
具体而言,可以对所述图像区块的色度值(例如,HSV格式图像的H值、YUV格式图像U和/或V值)进行直方图统计,得到色图直方图;然后将落入目标色度区间之外的其余像素作为所述图像区块内的待调整的目标像素。其中,所述目标色度区间可以根据实际应用场景需要进行设置,比如,可以将待调整的显示画面中人像区域内的各像素色度值覆盖的色度区间,作为所述目标色度区间,以避免对人像区域进行亮度调整,保证人像区域的显示效果。Specifically, the chromaticity values of the image block (for example, the H value of the HSV format image, the U and/or V value of the YUV format image) can be histogram-statisticed to obtain a color map histogram; and then the remaining pixels falling outside the target chromaticity interval are used as the target pixels to be adjusted in the image block. The target chromaticity interval can be set according to the needs of the actual application scenario. For example, the chromaticity interval covered by the chromaticity values of each pixel in the portrait area of the display screen to be adjusted can be used as the target chromaticity interval to avoid brightness adjustment of the portrait area and ensure the display effect of the portrait area.
在一种具体实施方式中,所述待调整的目标像素为位于所述图像区块的边缘区域的像素之外的像素(即,非位于所述图像区块的边缘区域的像素),可以直接将所述目标像素的亮度值(即,原始亮度值或调整前的亮度值)输入所述亮度-增益映射函数,以确定所述目标像素对应的目标亮度增益,采用该目标亮度增益与所述目标像素的原始亮度值的乘积,作为所述目标像素的调整后亮度值。In a specific embodiment, the target pixel to be adjusted is a pixel outside the pixel located in the edge area of the image block (i.e., a pixel not located in the edge area of the image block), and the brightness value of the target pixel (i.e., the original brightness value or the brightness value before adjustment) can be directly input into the brightness-gain mapping function to determine the target brightness gain corresponding to the target pixel, and the product of the target brightness gain and the original brightness value of the target pixel is used as the adjusted brightness value of the target pixel.
在另一种具体实施方式中,由于待调整的显示画面被分成若干个图像区块,如果不同块之间的内容差异较大,那么确定的各个亮度阈值对应的目标亮度增益也相应有较大差异,这会导致调整后的显示画面在不同块之间存在明显亮度差异,影响显示效果。为了免这种块间亮度差异,可以对不同图像区块块之间进行亮度平滑处理。平滑处理包括很多种处理方法。In another specific implementation, since the display image to be adjusted is divided into several image blocks, if the content difference between different blocks is large, then the target brightness gain corresponding to each determined brightness threshold value is also correspondingly large, which will cause the adjusted display image to have obvious brightness difference between different blocks, affecting the display effect. In order to avoid such brightness difference between blocks, brightness smoothing processing can be performed between different image blocks. Smoothing processing includes many processing methods.
例如,对位于图像区块的边缘区域的像素,在对该像素进行亮度调整之前,对该像素周围预设子区域(该区域跨越不同图像区块)内的各像素对应的目标亮度增益求加权平均值,作为用于调整该像素亮度值的最终目标亮度增益。For example, for a pixel located in the edge area of an image block, before the brightness of the pixel is adjusted, a weighted average of the target brightness gains corresponding to each pixel in a preset sub-area around the pixel (the area spans different image blocks) is calculated as the final target brightness gain for adjusting the brightness value of the pixel.
又如,对位于图像区块的边缘区域的像素,在对该像素进行亮度调整之之后,该像素周围预设子区域(该区域跨越不同图像区块)内的各像素的调整后亮度值求加权平均值,作为该像素的实际调整后亮度值。For another example, for a pixel located in an edge area of an image block, after the brightness of the pixel is adjusted, a weighted average of the adjusted brightness values of each pixel in a preset sub-area (the area spans different image blocks) around the pixel is calculated as the actual adjusted brightness value of the pixel.
关于上述区块间亮度平滑方法,具体可以参照下文针对图5的相关描述。Regarding the above-mentioned inter-block brightness smoothing method, please refer to the relevant description of FIG. 5 below for details.
参照图5,图5是图1中步骤S14的一种具体实施方式的流程图,本实施方式中,所述待调整的目标像素为位于所述图像区块的边缘区域的像素,所述根据所述亮度-增益映射函数确定该目标像素对应的目标亮度增益,具体可以包括步骤S141至S142。Referring to Figure 5, Figure 5 is a flowchart of a specific implementation of step S14 in Figure 1. In this implementation, the target pixel to be adjusted is a pixel located in the edge area of the image block, and the target brightness gain corresponding to the target pixel is determined according to the brightness-gain mapping function, which can specifically include steps S141 to S142.
在步骤S141中,对该目标像素周围预设子区域内的每个像素,分别将各像素的亮度值代入各自所属图像区块的亮度增益映射函数,得到各像素对应的目标亮度增益,其中,所述预设子区域包含与该目标像素所属图像区块的位置相邻的至少一个图像区块的像素。In step S141, for each pixel in a preset sub-region around the target pixel, the brightness value of each pixel is substituted into the brightness gain mapping function of the image block to which it belongs, so as to obtain the target brightness gain corresponding to each pixel, wherein the preset sub-region includes pixels of at least one image block adjacent to the position of the image block to which the target pixel belongs.
换言之,所述预设子区域跨越该目标像素所属图像区块及与该图像区块位置相邻的至少一个图像区块。In other words, the predetermined sub-region spans the image block to which the target pixel belongs and at least one image block adjacent to the image block.
在步骤S142中,将所述预设子区域内的全部像素对应的各目标亮度增益的加权平均值,作为该目标像素对应的目标亮度增益。In step S142, a weighted average of the target brightness gains corresponding to all pixels in the preset sub-region is taken as the target brightness gain corresponding to the target pixel.
进一步地,所述亮度-增益映射函数为包含多个目标函数的分段函数,每个目标函数具有各自对应的亮度阈值区间以及对应的预设亮度偏差,相邻的每两个目标函数之间通过分段点连接,所述步骤S14中,采用该目标亮度增益对该目标像素的亮度值进行亮度调整,具体可以包括:确定该目标像素的亮度值落入的亮度阈值区间,并获取该亮度阈值区间所属目标函数对应的预设亮度偏差,记为目标亮度偏差;计算该目标亮度增益与该目标像素的亮度值的乘积,然后将该乘积与该目标亮度偏差的和,作为该目标像素的调整后亮度值。Further, the brightness-gain mapping function is a piecewise function including a plurality of objective functions, each objective function having a corresponding brightness threshold interval and a corresponding preset brightness deviation, and each two adjacent objective functions are connected by a segmentation point. In the step S14, the brightness value of the target pixel is adjusted by using the target brightness gain, which may specifically include: determining the brightness threshold interval into which the brightness value of the target pixel falls, and obtaining a preset brightness deviation corresponding to the objective function to which the brightness threshold interval belongs, recorded as a target brightness deviation; calculating the product of the target brightness gain and the brightness value of the target pixel, and then taking the sum of the product and the target brightness deviation as the adjusted brightness value of the target pixel.
具体地,可以采用下述公式确定每个目标像素的调整后亮度值V′:Specifically, the adjusted brightness value V′ of each target pixel may be determined using the following formula:
其中,V′表示所述目标像素的调整后亮度值,V表示所述目标像素的原始亮度值(即,调整前亮度值),a1~an分别表示所述亮度-增益映射函数的第1~n段幂函数的第一系数,b1~bn分别表示所述第1~n段幂函数的第二系数,c1~cn分别表示所述第1~n段幂函数的第三系数,k1~kn分别为预设的常数,用于表示所述第1~n段幂函数的幂,gain0表示亮度增益常量,thr1′~thrn′分别表示第1~n个目标亮度阈值,coef1~coefn表示所述第1~n段幂函数对应的预设亮度偏差,coef0表示常数函数对应的预设亮度偏差。Among them, V′ represents the adjusted brightness value of the target pixel, V represents the original brightness value of the target pixel (that is, the brightness value before adjustment), a 1 to a n respectively represent the first coefficients of the 1st to nth power functions of the brightness-gain mapping function, b 1 to b n respectively represent the second coefficients of the 1st to nth power functions, c 1 to c n respectively represent the third coefficients of the 1st to nth power functions, k 1 to k n are respectively preset constants used to represent the powers of the 1st to nth power functions, gain 0 represents a brightness gain constant, thr 1 ′ to thr n ′ respectively represent the 1st to nth target brightness thresholds, coef 1 to coef n represent preset brightness deviations corresponding to the 1st to nth power functions, and coef 0 represents a preset brightness deviation corresponding to the constant function.
更进一步地,每个目标函数各自对应的预设亮度偏差可以采用下述方式确定:对于所述亮度-增益映射函数中的每个目标函数,将该目标函数与相邻的前一个目标函数的分段点的横坐标作为临界亮度值,并将该临界亮度值分别代入该目标函数与相邻的前一个目标函数,得到对应的第一目标亮度增益和第二目标亮度增益;分别计算所述临界亮度值与所述第一目标亮度增益的第一乘积,以及所述临界亮度值与所述第二目标亮度增益的第二乘积;采用所述第二乘积与所述相邻的前一个目标函数对应的预设亮度偏差的和,减去所述第一乘积,得到该目标函数对应的预设亮度偏差。Furthermore, the preset brightness deviation corresponding to each objective function can be determined in the following manner: for each objective function in the brightness-gain mapping function, the horizontal coordinate of the segmentation point between the objective function and the adjacent previous objective function is used as the critical brightness value, and the critical brightness value is substituted into the objective function and the adjacent previous objective function respectively to obtain the corresponding first target brightness gain and second target brightness gain; the first product of the critical brightness value and the first target brightness gain, and the second product of the critical brightness value and the second target brightness gain are calculated respectively; the sum of the second product and the preset brightness deviation corresponding to the adjacent previous objective function is taken, and the first product is subtracted to obtain the preset brightness deviation corresponding to the objective function.
在一个具体实施例中,亮度阈值区间[0,thr1′]的目标函数(即,常数函数Gain=gain0)对应的预设亮度偏差coef0=0。In a specific embodiment, the target function (ie, the constant function Gain=gain 0 ) in the brightness threshold interval [0, thr 1 ′] corresponds to a preset brightness deviation coef 0 =0.
即, Right now,
……以此类推,... and so on.
在本发明实施例中,通过设置每个目标函数具有对应的亮度偏差,并在计算目标亮度增益与目标像素的亮度值的乘积后,将该乘积与对应的目标亮度偏差的和,作为该目标像素的调整后亮度值,以使得在每相邻的两个目标函数的端点处的调整后亮度值保持一致(而非发生跳变)。如此,可以提高亮度调整的均匀性,避免调整后的显示画面的亮度发生突变,改进显示效果。In the embodiment of the present invention, each objective function is set to have a corresponding brightness deviation, and after calculating the product of the target brightness gain and the brightness value of the target pixel, the sum of the product and the corresponding target brightness deviation is used as the adjusted brightness value of the target pixel, so that the adjusted brightness values at the endpoints of each two adjacent objective functions remain consistent (rather than jumping). In this way, the uniformity of brightness adjustment can be improved, the brightness of the adjusted display screen can be avoided from suddenly changing, and the display effect can be improved.
参照图6,图6是本发明实施例中调整前的亮度值与调整后亮度值的映射曲线示意图。6 , which is a schematic diagram of a mapping curve between a brightness value before adjustment and a brightness value after adjustment in an embodiment of the present invention.
从图中可见,在亮度值区间[0,thr1],对应的调整后亮度值V′与原始亮度值(即,调整前亮度值)V之间的映射关系为一次函数映射关系,即,V′=V×gain0;当亮度值大于thr1时,调整后亮度值V′与调整前亮度值V之间的映射关系为曲线映射关系。在一个具体实施例中,thr1可以等于各目标亮度阈值中的最小目标亮度阈值thr1′。此外,从图中映射曲线可知,不同的亮度阈值区间对应的映射曲线之间均是连贯衔接的,不存在跳跃点。As can be seen from the figure, in the brightness value interval [0, thr 1 ], the mapping relationship between the corresponding adjusted brightness value V′ and the original brightness value (i.e., the brightness value before adjustment) V is a linear function mapping relationship, i.e., V′=V×gain 0 ; when the brightness value is greater than thr 1 , the mapping relationship between the adjusted brightness value V′ and the brightness value V before adjustment is a curve mapping relationship. In a specific embodiment, thr 1 can be equal to the minimum target brightness threshold thr 1 ′ among the target brightness thresholds. In addition, it can be seen from the mapping curves in the figure that the mapping curves corresponding to different brightness threshold intervals are all connected coherently without any jump points.
关于V′与V之间映射关系更多详细内容见前文的描述,此处不赘述。For more details about the mapping relationship between V′ and V, please refer to the previous description and will not be repeated here.
继续参照图1,在步骤S15的具体实施中,对各个处理后图像区块进行区块拼接,得到调整后的显示画面。各个处理后图像区块的拼接位置即为处理前的图像区块在所述待调整的显示画面中的位置。1, in the specific implementation of step S15, each processed image block is block-joined to obtain an adjusted display image. The joint position of each processed image block is the position of the image block before processing in the display image to be adjusted.
在本发明实施例中,通过将待调整的显示画面划分为若干独立的图像区块,以图像区块为粒度确定亮度-亮度增益之间的映射函数,以对各区块的像素分别进行亮度调整,可以获得更好精细化的亮度调整效果,相较于现有方案,在改善画面显示效果的同时降低显示驱动装置的功耗。进一步,本发明实施例中映射关系的确定无需计算每个像素的像素内差,而是直接采用每个区块各自预设的多个不同亮度阈值与亮度增益进行映射,可以显著减小计算量和计算复杂度,提高亮度调整效率和实时性。In the embodiment of the present invention, by dividing the display screen to be adjusted into a number of independent image blocks, the mapping function between brightness and brightness gain is determined with the image block as the granularity, so as to adjust the brightness of the pixels of each block respectively, a better and more refined brightness adjustment effect can be obtained, and compared with the existing scheme, the power consumption of the display driving device is reduced while improving the image display effect. Furthermore, in the embodiment of the present invention, the mapping relationship is determined without calculating the pixel difference of each pixel, but directly using a plurality of different brightness thresholds preset for each block and the brightness gain for mapping, which can significantly reduce the amount of calculation and the complexity of calculation, and improve the efficiency and real-time performance of brightness adjustment.
进一步地,在对各个处理后图像区块进行区块拼接之前,所述方法还包括:对位于所述处理后图像区块的边缘区域的每个目标像素,采用该目标像素周围预设子区域内各像素的调整后亮度值的加权平均值,更新该目标像素的调整后亮度值;其中,所述预设子区域包含与该目标像素所属图像区块的位置相邻的至少一个图像区块的像素。如此,也可以实现对各图像区块之间的边缘区域的像素亮度值的平滑过渡,改进亮度调整后的显示画面的显示效果。Furthermore, before block stitching is performed on each processed image block, the method further includes: for each target pixel located in the edge area of the processed image block, the weighted average value of the adjusted brightness values of each pixel in a preset sub-area around the target pixel is used to update the adjusted brightness value of the target pixel; wherein the preset sub-area includes pixels of at least one image block adjacent to the position of the image block to which the target pixel belongs. In this way, a smooth transition of the pixel brightness values in the edge area between the image blocks can also be achieved, thereby improving the display effect of the display picture after brightness adjustment.
图7是本发明实施例中另一种显示画面的亮度调整方法的部分流程图。所述另一种显示画面的亮度调整方法可以包括图1所示步骤S11至步骤S15,还可以包括步骤S71至S73,其中,步骤S71至S73可以在步骤S15之后执行。以下对与图1中的不同内容进行说明。FIG7 is a partial flow chart of another method for adjusting the brightness of a display screen in an embodiment of the present invention. The another method for adjusting the brightness of a display screen may include steps S11 to S15 shown in FIG1 , and may also include steps S71 to S73, wherein steps S71 to S73 may be performed after step S15. The following is an explanation of the differences from FIG1 .
在步骤S71中,对所述调整后的显示画面的每个处理后图像区块,判断其与相邻的前一帧调整后显示画面的同一位置的处理后图像区块的区块亮度值之差,是否大于预设亮度差。In step S71, for each processed image block of the adjusted display frame, it is determined whether the difference in block brightness between the processed image block at the same position of the adjacent previous adjusted display frame is greater than a preset brightness difference.
其中,所述相邻具体指显示画面在显示屏显示的时刻或时机相邻。The term "adjacent" specifically refers to the time or timing at which the display images are displayed on the display screen being adjacent.
在步骤S72中,如果判断结果为是,则对所述处理后图像区块的每个目标像素,确定所述相邻的前一帧调整后显示画面中的同一位置的目标像素。In step S72, if the determination result is yes, then for each target pixel of the processed image block, the target pixel at the same position in the adjacent previous frame adjusted display image is determined.
在步骤S73中,采用该目标像素对应的目标亮度增益和所述同一位置的目标像素对应的目标亮度增益的平均值,对所述处理后图像区块的该目标像素的调整后亮度值进行二次调整,从而得到二次调整后的显示画面。In step S73, the adjusted brightness value of the target pixel in the processed image block is secondarily adjusted by using the target brightness gain corresponding to the target pixel and the average value of the target brightness gain corresponding to the target pixel at the same position, thereby obtaining a secondarily adjusted display image.
可以理解的是,如果显示时机相邻的两帧显示画面的同一位置的显示内容差异较大,其对应的各个目标亮度增益的差异也会较大,这会导致视频播放过程中局部位置出现闪烁。因此,在本发明实施例中,可以采用上述方案对前后两帧显示画面的同一位置的目标亮度增益进行平滑处理。如此,可以避免闪烁问题,提高不同帧间画面的平滑性及显示效果。It is understandable that if the display contents of the same position of two adjacent display frames are greatly different, the corresponding target brightness gains will also be greatly different, which will cause flickering at a local position during video playback. Therefore, in an embodiment of the present invention, the above scheme can be used to smooth the target brightness gains of the same position of the two preceding and succeeding display frames. In this way, the flickering problem can be avoided and the smoothness and display effect of the pictures between different frames can be improved.
参照图8,图8是本发明实施例中一种显示画面的亮度调整装置的结构示意图。所述显示画面的亮度调整装置可以包括:Referring to FIG8 , FIG8 is a schematic diagram of a structure of a device for adjusting the brightness of a display screen according to an embodiment of the present invention. The device for adjusting the brightness of a display screen may include:
图像区块获取模块81,用于获取待处理的图像区块,并确定每个图像区块的区块亮度值,所述图像区块是对待调整的显示画面进行区块划分得到的;An image block acquisition module 81 is used to acquire image blocks to be processed and determine a block brightness value of each image block, wherein the image blocks are obtained by dividing the display image to be adjusted into blocks;
对应关系确定模块82,用于至少基于所述图像区块的区块亮度值,确定所述图像区块的每个预设的亮度阈值各自对应的目标亮度增益,其中,每个图像区块具有预设的多个不同亮度阈值,亮度阈值越大,对应的目标亮度增益越小;A corresponding relationship determination module 82, configured to determine, based at least on the block brightness value of the image block, a target brightness gain corresponding to each preset brightness threshold of the image block, wherein each image block has a plurality of preset different brightness thresholds, and the larger the brightness threshold, the smaller the corresponding target brightness gain;
函数拟合模块83,用于采用所述图像区块的各个亮度阈值及其对应的目标亮度增益进行函数拟合,得到所述图像区块的亮度-增益映射函数;A function fitting module 83 is used to perform function fitting using each brightness threshold of the image block and its corresponding target brightness gain to obtain a brightness-gain mapping function of the image block;
图像区块亮度调整模块84,用于对所述图像区块内的每个待调整的目标像素,根据所述亮度-增益映射函数确定该目标像素对应的目标亮度增益,并采用该目标亮度增益对该目标像素的亮度值进行亮度调整,以确定处理后图像区块;An image block brightness adjustment module 84 is used to determine, for each target pixel to be adjusted in the image block, a target brightness gain corresponding to the target pixel according to the brightness-gain mapping function, and use the target brightness gain to perform brightness adjustment on the brightness value of the target pixel to determine a processed image block;
图像区块拼接模块85,用于对各个处理后图像区块进行区块拼接,得到调整后的显示画面。The image block stitching module 85 is used to stitch the processed image blocks to obtain an adjusted display image.
关于该显示画面的亮度调整装置的原理、具体实现和有益效果请参照前文及图1至图7示任一实施例出的关于显示画面的亮度调整方法的相关描述,此处不再赘述。Regarding the principle, specific implementation and beneficial effects of the display screen brightness adjustment device, please refer to the relevant description of the display screen brightness adjustment method shown in the above text and any embodiment shown in Figures 1 to 7, which will not be repeated here.
本发明实施例还提供了一种存储介质,例如为计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器运行时执行上述图1至图7示任一实施例出的关于显示画面的亮度调整方法的步骤。所述计算机可读存储介质可以包括非挥发性存储器(non-volatile)或者非瞬态(non-transitory)存储器,还可以包括光盘、机械硬盘、固态硬盘等。The embodiment of the present invention further provides a storage medium, such as a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method for adjusting the brightness of a display screen shown in any of the embodiments shown in Figures 1 to 7 are executed. The computer-readable storage medium may include a non-volatile memory or a non-transitory memory, and may also include an optical disk, a mechanical hard disk, a solid-state hard disk, etc.
具体地,在本发明实施例中,所述处理器可以为中央处理单元(centralprocessing unit,简称CPU),该处理器还可以是其他通用处理器、数字信号处理器(digital signal processor,简称DSP)、专用集成电路(application specificintegrated circuit,简称ASIC)、现成可编程门阵列(field programmable gate array,简称FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。Specifically, in the embodiment of the present invention, the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
还应理解,本申请实施例中的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(read-only memory,简称ROM)、可编程只读存储器(programmable ROM,简称PROM)、可擦除可编程只读存储器(erasable PROM,简称EPROM)、电可擦除可编程只读存储器(electricallyEPROM,简称EEPROM)或闪存。易失性存储器可以是随机存取存储器(random accessmemory,简称RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的随机存取存储器(random access memory,简称RAM)可用,例如静态随机存取存储器(staticRAM,简称SRAM)、动态随机存取存储器(DRAM)、同步动态随机存取存储器(synchronousDRAM,简称SDRAM)、双倍数据速率同步动态随机存取存储器(doubledata rate SDRAM,简称DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,简称ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,简称SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,简称DR RAM)。It should also be understood that the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM) and direct rambus RAM (DR RAM).
本发明实施例还提供了一种终端,包括存储器和处理器,所述存储器上存储有能够在所述处理器上运行的计算机程序,所述处理器运行所述计算机程序时执行上述图1至图7示任一实施例出的关于显示画面的亮度调整方法的步骤。An embodiment of the present invention also provides a terminal, including a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor runs the computer program, the steps of the method for adjusting the brightness of the display screen shown in any embodiment shown in Figures 1 to 7 are executed.
本发明实施例还提供了一种计算机程序产品,包括计算机程序,所述计算机程序被处理器运行时执行上述图1至图7示任一实施例出的关于显示画面的亮度调整方法的步骤。An embodiment of the present invention further provides a computer program product, including a computer program, which, when executed by a processor, executes the steps of the method for adjusting the brightness of a display screen in any of the embodiments shown in FIG. 1 to FIG. 7 .
应理解,本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,表示前后关联对象是一种“或”的关系。It should be understood that the term "and/or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and/or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character "/" in this article indicates that the associated objects before and after are in an "or" relationship.
本申请实施例中出现的“多个”是指两个或两个以上。The "plurality" appearing in the embodiments of the present application refers to two or more.
本申请实施例中出现的第一、第二等描述,仅作示意与区分描述对象之用,没有次序之分,也不表示本申请实施例中对设备个数的特别限定,不能构成对本申请实施例的任何限制。The first, second, etc. descriptions appearing in the embodiments of the present application are only used for illustration and distinction of the description objects. There is no order, nor do they indicate any special limitation on the number of devices in the embodiments of the present application, and cannot constitute any limitation on the embodiments of the present application.
需要指出的是,本实施例中各个步骤的序号并不代表对各个步骤的执行顺序的限定。It should be noted that the serial numbers of the steps in this embodiment do not limit the execution order of the steps.
虽然本发明披露如上,但本发明并非限定于此。任何本领域技术人员,在不脱离本发明的精神和范围内,均可作各种更动与修改,因此本发明的保护范围应当以权利要求所限定的范围为准。Although the present invention is disclosed as above, the present invention is not limited thereto. Any person skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the scope defined by the claims.
Claims (15)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410799511.8A CN118645065A (en) | 2024-06-19 | 2024-06-19 | Display screen brightness adjustment method and device, storage medium, terminal, and computer program product |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410799511.8A CN118645065A (en) | 2024-06-19 | 2024-06-19 | Display screen brightness adjustment method and device, storage medium, terminal, and computer program product |
Publications (1)
Publication Number | Publication Date |
---|---|
CN118645065A true CN118645065A (en) | 2024-09-13 |
Family
ID=92665971
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410799511.8A Pending CN118645065A (en) | 2024-06-19 | 2024-06-19 | Display screen brightness adjustment method and device, storage medium, terminal, and computer program product |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118645065A (en) |
-
2024
- 2024-06-19 CN CN202410799511.8A patent/CN118645065A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10878543B2 (en) | Group management method, terminal, and storage medium | |
JP5334402B2 (en) | Display apparatus and method for improving flicker of video | |
CN107257452B (en) | A kind of image processing method, device and calculate equipment | |
US20210158488A1 (en) | Image edge processing method, electronic device, and computer readable storage medium | |
US7969408B2 (en) | Image display control device | |
US9311696B2 (en) | Color enhancement for graphic images | |
WO2020135234A1 (en) | Image processing method and apparatus | |
CN113573032B (en) | Image processing method and projection system | |
WO2018149172A1 (en) | Image processing method and apparatus | |
CN112967690B (en) | Image display method and device, storage medium and terminal | |
CN116825039B (en) | Backlight brightness calculating method, display device and computer readable storage medium | |
CN100556071C (en) | image processing method | |
CN101193239B (en) | Method, device and system for adjusting display characteristics of video frame | |
US20200160492A1 (en) | Image Adjustment Method and Device, Image Display Method and Device, Non-Transitory Storage Medium | |
CN112884661B (en) | Image processing apparatus, image processing method, display apparatus, and computer-readable storage medium | |
WO2023284528A1 (en) | Image enhancement method and apparatus, computer device, and storage medium | |
WO2023000868A1 (en) | Image processing method and apparatus, device, and storage medium | |
TW202004662A (en) | Method and computer system of image enhancement | |
TW201606732A (en) | Image adjusting method and related display | |
KR100612494B1 (en) | Device and method for adjusting color saturation | |
CN103685972B (en) | Image optimization method and system using the method | |
CN118645065A (en) | Display screen brightness adjustment method and device, storage medium, terminal, and computer program product | |
US10909669B2 (en) | Contrast adjustment system and contrast adjustment method | |
US11869168B2 (en) | Method for optimizing display image based on display content, related display control chip and related non-transitory computer-readable medium | |
CN113891081A (en) | Video processing method, device and equipment |
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 |