Method, apparatus, device, and medium for compensating brightness
View Patent ↗A method, apparatus, device, and medium for compensating brightness. The method includes: arranging a plurality of first anchor points and at least one fixed anchor point in a display area of a display panel; dividing the display area of the display panel into a plurality of adjustment areas each including at least one of the first anchor points, and determining a first compensation gain for each of the adjustment areas under a grey scale image to be compensated; determining a second compensation gain corresponding to the first anchor point according to a brightness value corresponding to the first anchor point, a brightness value corresponding to the fixed anchor point, and the first compensation gain of the adjustment area to which the first anchor point belongs; and performing brightness compensation on a pixel corresponding to the first anchor point according to the second compensation gain.
1 . A method for compensating brightness, comprising:
arranging a plurality of first anchor points and at least one fixed anchor point in a display area of a display panel;
dividing the display area of the display panel into a plurality of adjustment areas each comprising at least one of the first anchor points, and determining a first compensation gain for each of the adjustment areas under a grey scale image to be compensated;
determining a second compensation gain corresponding to the first anchor point according to a brightness value corresponding to the first anchor point, a brightness value corresponding to the fixed anchor point, and the first compensation gain of the adjustment area to which the first anchor point belongs; and
performing brightness compensation on a pixel corresponding to the first anchor point according to the second compensation gain,
wherein dividing the display area of the display panel into the plurality of adjustment areas each comprising at least one of the first anchor points, and determining the first compensation gain for each other of the adjustment areas under the grey scale image to be compensated comprise:
dividing the display area of the display panel into the plurality of adjustment areas each comprising at least one of the first anchor points, and determining a first brightness representative value for each of the adjustment areas under the grey scale image to be compensated; and
determining the first compensation gain for the adjustment area according to the first brightness representative value and a target brightness value corresponding to the adjustment area,
wherein dividing the display area of the display panel into the plurality of the adjustment areas each comprising at least one of the first anchor points, and determining the first brightness representative value for each of the adjustment areas under the grey scale image to be compensated comprise:
dividing the display area of the display panel into a plurality of second subareas according to a plurality of preset second anchor points, wherein the plurality of the first anchor points and the at least one fixed anchor point divide the display area of the display panel into a plurality of first subareas each comprising at least one of the second subareas;
organizing the plurality of the second subareas as the plurality of adjustment areas each comprising at least one of the first subareas;
acquiring brightness of a plurality of pixels in each of the second subareas under the grey scale image to be compensated, and determining a second brightness representative value for each of the second subareas; and
determining the first brightness representative value of the adjustment area under the grey scale image to be compensated according to the second brightness representative value of the second subarea in the adjustment area,
wherein the adjustment area comprises a plurality of second subareas, and determining the first brightness representative value of the adjustment area under the grey scale image to be compensated according to the second brightness representative value of the second subarea in the adjustment area comprises:
selecting one of the plurality of second subareas in the adjustment area as a target area, and making a distance between the selected target are and the other of the plurality of second subareas in the adjustment area to be less than or equal to a first threshold value; and
determining the second brightness representative value of the selected target area as the first brightness representative value of the adjustment area under the grey scale image to be compensated.
2 . The method according to claim 1 , wherein the first brightness representative value represents a brightness trend of the adjustment area.
3 . The method according to claim 1 , wherein acquiring brightness of a plurality of pixels in each of the second subareas under the grey scale image to be compensated, and determining the second brightness representative value for each of the second subareas comprise:
acquiring brightness of a plurality of pixels in each of the second subareas under the grey scale image to be compensated, and determining a brightness distribution pattern for each of the second subareas; and
determining the second brightness representative value for each of the second subareas according to the brightness distribution pattern of the second subarea.
4 . The method according to claim 3 , wherein acquiring brightness of a plurality of pixels in each of the second subareas under the grey scale image to be compensated, and determining the brightness distribution pattern for each of the second subareas comprise:
acquiring brightness values of the plurality of pixels in each of the second subareas under the grey scale image to be compensated;
counting, for any of the second subareas, a number of each of the brightness values in the second subarea;
setting a weight corresponding to each of the brightness values according to the number of the brightness value; and
determining the brightness distribution pattern of the second subarea according to the brightness values and the weights of the brightness values in the second subarea.
5 . The method according to claim 1 , wherein selecting one of the plurality of second subareas in the adjustment area as the target area, and making a distance between the selected target area and the other of the plurality of second subareas in the adjustment area to be less than or equal to the first threshold value comprise:
selecting one of the plurality of second subareas in the adjustment area as a pending area;
calculating first distances between the pending area and the other of the second subareas in the adjustment area;
determining whether a maximum one of the first distances is less than or equal to the first threshold value;
if the maximum one of the first distances is less than or equal to the first threshold value, determining the pending area as the target area; and
if the maximum one of the first distances is not less than or equal to the first threshold value, re-selecting one of the second subareas as the pending area and calculating second distances between the re-selected pending area and the other of the second subareas in the adjustment area which have not been selected, until a maximum one of the second distances is less than or equal to the first threshold value, and determining the re-selected pending area as the target area.
6 . The method according to claim 5 , wherein re-selecting one of the second subareas as the pending area comprises:
calculating an average coordinate value of the other of the second subareas in the adjustment area which have not been selected, and determining a second subarea corresponding to the average coordinate value as the re-selected pending area.
7 . The method according to claim 1 , wherein determining the first compensation gain for the adjustment area according to the first brightness representative value and the target brightness value corresponding to the adjustment area comprises:
calculating a first ratio between the first brightness representative value and the target brightness value corresponding to the adjustment area to obtain the first compensation gain of the adjustment area.
8 . The method according to claim 1 , wherein the target brightness value comprises an average brightness value of a central area in the display area under the grey scale image to be compensated; or
the target brightness value comprises a required brightness value corresponding to the grey scale image to be compensated; or
the at least one fixed anchor point comprises at least three fixed anchor points, a plurality of the fixed anchor points enclose and form a fixed area, and the target brightness value comprises an average brightness value of the fixed area under the grey scale image to be compensated.
9 . The method according to claim 1 , wherein determining the second compensation gain corresponding to the first anchor point according to the brightness value corresponding to the first anchor point, the brightness value corresponding to the fixed anchor point, and the first compensation gain of the adjustment area to which the first anchor point belongs comprises:
calculating a second ratio between the brightness value corresponding to the first anchor point and the brightness value corresponding to the fixed anchor point; and
calculating a product of the second ratio and the first compensation gain of the adjustment area to which the first anchor point belongs to obtain the second compensation gain corresponding to the first anchor point.
10 . The method according to claim 1 , wherein the brightness value corresponding to the first anchor point comprises a brightness value of a pixel at a location of the first anchor point, and the brightness value corresponding to the fixed anchor point comprises a brightness value of a pixel at a location of the fixed anchor point.
11 . The method according to claim 1 , wherein the brightness value corresponding to the first anchor point comprises an average brightness value of pixels in an area where the first anchor point is located, and the brightness value corresponding to the fixed anchor point comprises an average brightness value of pixels in an area where the fixed anchor point is located.
12 . The method according to claim 1 , wherein the brightness value corresponding to the fixed anchor point comprises a preset value, and the brightness value corresponding to the first anchor point comprises a product of the preset value and a preset coefficient.
13 . The method according to claim 1 , wherein the first anchor points are located at an edge of the display area, and a plurality of the first anchor points surround the fixed anchor point.
14 . The method according to claim 1 , wherein a plurality of the first anchor points are uniformly distributed at the edge of the display area.
15 . An electronic device, comprising:
a processor and a memory storing computer program instructions, wherein the processor, when executing the computer program instructions, implements the method for compensating brightness according to claim 1 .
16 . A non-transitory computer-readable storage medium storing computer program instructions thereon, wherein the computer program instructions, when executed by a processor, implement the method for compensating brightness according to claim 1 .
17 . An apparatus for compensating brightness, comprising:
an anchor point arrangement module configured to arrange a plurality of first anchor points and at least one fixed anchor point in a display area of a display panel;
a first compensation gain determination module configured to divide the display area of the display panel into a plurality of adjustment areas each comprising at least one of the first anchor points, and determine a first compensation gain for each of the adjustment areas under a grey scale image to be compensated;
a second compensation gain determination module configured to determine a second compensation gain corresponding to the first anchor point according to a brightness value corresponding to the first anchor point, a brightness value corresponding to the fixed anchor point, and the first compensation gain of the adjustment area to which the first anchor point belongs; and
a compensation module configured to perform brightness compensation on a pixel corresponding to the first anchor point according to the second compensation gain,
wherein the first compensation gain determination module is specifically configured to: divide the display area of the display panel into the plurality of adjustment areas each comprising at least one of the first anchor points, and determine a first brightness representative value for each of the adjustment areas under grey scale image to be compensated; and determine the first compensation gain for the adjustment area according to the first brightness representative value and a target brightness value corresponding to the adjustment area,
the first compensation gain determination module is specifically configured to: divide the display area of the display panel into a plurality of the second subareas according to a plurality of preset second anchor points, wherein the plurality of the first anchor points and the at least one fixed anchor point divide the display area of the display panel into a plurality of the first subareas each comprising at least one of the second subareas; organize the plurality of the second subareas as the plurality of adjustment areas each comprising at least one of the first subareas; acquire brightness of a plurality of pixels in each of the second subareas under the grey scale image to be compensated, and determine a second brightness representative value for each of the second subareas; and determine the first brightness representative value of the adjustment area under the grey scale image to be compensated according to the second brightness representative value of the second subarea in the adjustment area, and
wherein the adjustment area comprises a plurality of the second subareas, and the first compensation gain determination module is specifically configured to: select one of the plurality of second subareas in the adjustment area as a target area, and make a distance between the selected target area and the other of the plurality of the second subareas in the adjustment area to be less than or equal to a first threshold value; and determine the second brightness representative value of the selected target area as the first brightness representative value of the adjustment area under the grey scale image to be compensated.
18 . The apparatus according to claim 17 , wherein the first brightness representative value represents a brightness trend of the adjustment area.
19 . The apparatus according to claim 17 , wherein the first compensation gain determination module is specifically configured to:
select one of the plurality of second subareas in the adjustment area as a pending area;
calculate first distances between the pending area and the other of the second subareas in the adjustment area;
determine whether a maximum one of the first distances is less than or equal to the first threshold value;
if the maximum one of the first distances is less than or equal to the first threshold value, determine the pending area as the target area; and
if the maximum one of the first distances is not less than or equal to the first threshold value, re-select one of the second subareas as the pending area and calculate second distances between the re-selected pending area and the other of the second subareas in the adjustment area which have not been selected, until a maximum one of the second distances is less than or equal to the first threshold value, and determine the re-selected pending area as the target area.
20 . The apparatus according to claim 19 , wherein the first compensation gain determination module is configured to re-select one of the second subareas as the pending area by: calculating an average coordinate value of the other of the second subareas in the adjustment area which have not been selected, and determining a second subarea corresponding to the average coordinate value as the re-selected pending area.