Electronic equipment, gray scale compensation method and device and storage medium
Patent Information
- Application Number
- CN202480000296.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-20
- Publication Date
- 2025-10-24
AI Technical Summary
The existing LCD pixel gray-scale computing circuits have problems with low accuracy and poor compatibility in local dimming technology, especially the compatibility of different backlight partition sizes is difficult to guarantee.
By determining the weight value and point diffusion coefficient of each backlight partition, the processor is used to perform high-precision grayscale compensation, and combined with a lookup table and a convolution calculation module, the image grayscale value is accurately corrected to improve image brightness and compatibility.
High-precision grayscale compensation is achieved, image quality and compatibility are improved, and image display effect is ensured under different backlight partition sizes.
Smart Images

Figure CN120836053A_ABST
Abstract
Description
Electronic device, grayscale compensation method, device and storage medium Technical Field
[0001] The present disclosure relates to the field of communication technology, and in particular to an electronic device, a grayscale compensation method, a device, and a storage medium. Background Art
[0002] If local dimming technology is used in LCD displays, the reduction in backlight brightness will usually lead to a decrease in pixel display brightness (usually a portion of high grayscale pixels). Therefore, a specific grayscale compensation algorithm is needed to increase pixel brightness.
[0003] The LCD pixel grayscale calculation circuit is a crucial component of the local dimming IP (Local Dimming IP). Currently, conventional LCD pixel calculation circuits for LD IPs typically employ two implementation methods: 1) displaying the image's original grayscale values without any compensation; 2) using a low-precision grayscale compensation circuit to calculate grayscale values. However, these conventional solutions often suffer from low IP accuracy and poor compatibility.
[0004] Summary of the Invention
[0005] In one aspect, an electronic device, a grayscale compensation method, a device, and a storage medium are provided.
[0006] The electronic device includes: a display screen and a processor; the display screen is used to display images, the display screen corresponds to multiple backlight partitions, and each backlight partition corresponds to an area of the image; the processor is configured to: determine a weight value of each backlight partition in the multiple backlight partitions; the weight value of the backlight partition is used to represent the degree of influence of the light source of the backlight partition on the brightness of the image displayed on the display screen; the processor is configured to: determine the grayscale value of the image based on the backlight values and weight values of the multiple backlight partitions.
[0007] In view of this, an embodiment of the present application provides an electronic device, in which a processor can determine the degree of influence of the light source of each backlight partition in multiple backlight partitions on the brightness of the image displayed on the display screen, that is, the weight value of each backlight partition, and correct the grayscale value of the image displayed on the display screen based on the weight value and the backlight value, thereby achieving high-precision grayscale compensation and improving compatibility and image quality.
[0008] In some embodiments, the multiple backlight partitions include a target backlight partition and multiple neighboring backlight partitions of the target backlight partition, and the multiple neighboring backlight partitions are partitions affected by the backlight light source of the target backlight partition; the weight value includes a first weight corresponding to each neighboring backlight partition in the multiple neighboring backlight partitions, and a second weight corresponding to the target backlight partition.
[0009] Based on the above technical solution, each backlight partition in the embodiment of the present application has a degree of influence on the image quality, so as to facilitate the subsequent accurate determination of the influencing factors affecting the image brightness.
[0010] In some embodiments, the processor is specifically configured to: obtain the point spread coefficient of each neighborhood backlight partition; the point spread coefficient is used to indicate the degree of influence of the neighborhood backlight partition light source on the target pixel point; the greater the distance from the target pixel point to the neighborhood backlight partition, the smaller the point spread coefficient of the neighborhood backlight partition; the target pixel point is any pixel point in the target backlight partition; according to the point spread coefficient of each neighborhood backlight partition, determine the corresponding first weight of each; based on the first weight of each neighborhood backlight partition, determine the second weight corresponding to the target backlight partition.
[0011] Based on the above technical solution, the processor in the embodiment of the present application can determine the relative position between different neighborhood backlight partitions and the target pixel point. It can be understood that the greater the distance between a neighborhood backlight partition and the target pixel point, the less the neighborhood backlight partition is affected by the backlight of the backlight partition where the target pixel point is located. Correspondingly, the point diffusion coefficient of the neighborhood backlight partition is smaller. Furthermore, the processor can accurately determine the degree of influence of the neighborhood backlight partition on the grayscale of a certain pixel in the image based on the point diffusion coefficient of the neighborhood backlight partition.
[0012] In some embodiments, the point spread coefficient includes a plurality of sub-diffusion coefficients; and the processor is further configured to: determine a first weight of the neighborhood backlight partition according to the plurality of sub-diffusion coefficients and a preset difference algorithm.
[0013] Based on the above technical solution, since each neighborhood backlight partition in the embodiment of the present application includes multiple sub-diffusion coefficients, the processor can accurately determine the weight of each neighborhood backlight partition by performing difference operations on the multiple sub-diffusion coefficients.
[0014] In some embodiments, the processor is specifically configured to: for each neighborhood backlight partition, determine the point diffusion coefficient of the neighborhood backlight partition based on the index value of the neighborhood backlight partition and a preset correspondence; one neighborhood backlight partition corresponds to multiple index values; the preset correspondence includes multiple sub-diffusion coefficients, and one sub-diffusion coefficient corresponds to any two index values among the multiple index values.
[0015] Based on the above technical solution, the preset correspondence in the embodiment of the present application can be understood as a lookup table of a neighborhood backlight partition. Since the data in the lookup table of each neighborhood backlight partition is too large, the embodiment of the present application provides an index value for each neighborhood backlight partition. Through the index value, the point diffusion coefficient of each neighborhood backlight partition is determined.
[0016] In some embodiments, the processor is further configured to: determine a binary value corresponding to the coordinate distance from the neighborhood backlight partition to the target pixel point; and use a preset digit value in the binary value as an index value for each neighborhood backlight partition and the target pixel point.
[0017] In some embodiments, the processor is further configured to: for each neighborhood backlight partition, determine the index operation rule of the neighborhood backlight partition based on the identifier of the neighborhood backlight partition to obtain the index operation rule of each neighborhood backlight partition; the index operation rule is used to determine the index value of the neighborhood backlight partition and the target pixel point.
[0018] Based on the above technical solution, the embodiment of the present application provides a corresponding index operation rule for each neighborhood backlight partition. After the processor converts the coordinate distance from each neighborhood backlight partition to the target pixel point into binary, it can determine the corresponding index operation rule according to the identification of each backlight partition, substitute the converted coordinate distance into the corresponding index operation rule, and calculate the index value of each neighborhood backlight partition.
[0019] In some embodiments, the coordinate distance includes the longitudinal distance from the neighboring backlight partition to the target pixel point and the lateral distance from the neighboring backlight partition to the target pixel point; multiple index values include a first index value, a second index value, a third index value, and a fourth index value; the first index value is: the binary value on the preset digit of the longitudinal distance, or the binary value on the preset digit of the first difference; the first difference is the difference between the partition height of the neighboring backlight partition and the longitudinal distance; the second index value is: the sum of the first index value and the threshold; the third index value is: the binary value on the preset digit of the lateral distance, or the binary value on the preset digit of the second difference; the second difference is the difference between the partition width of the neighboring backlight partition and the lateral distance; the fourth index value is: the sum of the third index value and the threshold.
[0020] In some embodiments, the processor is further configured to: determine an impact factor of the image based on backlight values and weight values of multiple backlight partitions; the impact factor is a factor used to correct image brightness; and determine a grayscale value of the image based on the impact factor.
[0021] In some embodiments, the processor is specifically configured to: obtain historical grayscale values of multiple channels of the image; and determine the grayscale value of the image based on the historical grayscale values of the multiple channels and the influencing factors.
[0022] Based on the above technical solution, the processor in the embodiment of the present application accurately determines the influencing factor affecting the image brightness, and then corrects the historical grayscale value using the influencing factor to obtain the corrected image grayscale value, thereby ensuring the display quality of the image.
[0023] In some embodiments, a plurality of backlight values are cached in the processor, and the plurality of backlight values include backlight values of a plurality of backlight partitions.
[0024] In some embodiments, the sum of the first weights of the plurality of neighboring backlight partitions and the second weight of the target backlight partition is 1.
[0025] In view of this, an embodiment of the present application provides a grayscale compensation method, which is applied to an electronic device, wherein the electronic device includes: a display screen, and a processor; the display screen is used to display an image, and the display screen corresponds to multiple backlight partitions, and one backlight partition corresponds to an area of the image; the method includes: determining a weight value of each backlight partition in the multiple backlight partitions; the weight value of the backlight partition is used to represent the degree of influence of the light source of the backlight partition on the brightness of the image displayed on the display screen; and determining the grayscale value of the image based on the backlight values and weight values of the multiple backlight partitions.
[0026] In some embodiments, the multiple backlight partitions include a target backlight partition and multiple neighboring backlight partitions of the target backlight partition, and the multiple neighboring backlight partitions are partitions affected by the backlight light source of the target backlight partition; the weight value includes a first weight corresponding to each neighboring backlight partition in the multiple neighboring backlight partitions, and a second weight corresponding to the target backlight partition.
[0027] In some embodiments, determining the weight value of each backlight partition in a plurality of backlight partitions includes: obtaining the point spread coefficient of each neighborhood backlight partition; the point spread coefficient is used to indicate the degree of influence of the neighborhood backlight partition light source on the target pixel point; the greater the distance from the target pixel point to the neighborhood backlight partition, the smaller the point spread coefficient of the neighborhood backlight partition; the target pixel point is any pixel point in the target backlight partition; according to the point spread coefficient of each neighborhood backlight partition, determining the corresponding first weight of each; based on the first weight of each neighborhood backlight partition, determining the second weight corresponding to the target backlight partition.
[0028] In some embodiments, the point spread coefficient includes a plurality of sub-diffusion coefficients; and the method further includes: determining a first weight of the neighborhood backlight partition according to the plurality of sub-diffusion coefficients and a preset difference algorithm.
[0029] In some embodiments, the point diffusion coefficient of each neighborhood backlight partition is obtained, including: for each neighborhood backlight partition, based on the index value of the neighborhood backlight partition and a preset correspondence, determining the point diffusion coefficient of the neighborhood backlight partition; one neighborhood backlight partition corresponds to multiple index values; the preset correspondence includes multiple sub-diffusion coefficients, and one sub-diffusion coefficient corresponds to any two index values among the multiple index values.
[0030] In some embodiments, the method further includes: determining a binary value corresponding to the coordinate distance from the neighborhood backlight partition to the target pixel point; and using a preset digit value in the binary value as an index value for each neighborhood backlight partition and the target pixel point.
[0031] In some embodiments, the method further includes: for each neighborhood backlight partition, based on the identifier of the neighborhood backlight partition, determining the index operation rule of the neighborhood backlight partition to obtain the index operation rule of each neighborhood backlight partition; the index operation rule is used to determine the index value of the neighborhood backlight partition and the target pixel point.
[0032] In some embodiments, the coordinate distance includes the longitudinal distance from the neighboring backlight partition to the target pixel point and the lateral distance from the neighboring backlight partition to the target pixel point; multiple index values include a first index value, a second index value, a third index value, and a fourth index value; the first index value is: the binary value on the preset digit of the longitudinal distance, or the binary value on the preset digit of the first difference; the first difference is the difference between the partition height of the neighboring backlight partition and the longitudinal distance; the second index value is: the sum of the first index value and the threshold; the third index value is: the binary value on the preset digit of the lateral distance, or the binary value on the preset digit of the second difference; the second difference is the difference between the partition width of the neighboring backlight partition and the lateral distance; the fourth index value is: the sum of the third index value and the threshold.
[0033] In some embodiments, the grayscale value of the image is determined based on the backlight values and weight values of multiple backlight partitions, including: determining the impact factor of the image based on the backlight values and weight values of multiple backlight partitions; the impact factor is a factor used to correct the brightness of the image; and determining the grayscale value of the image based on the impact factor.
[0034] In some embodiments, determining the grayscale value of the image based on the influencing factors includes: obtaining historical grayscale values of multiple channels of the image; and determining the grayscale value of the image based on the historical grayscale values of the multiple channels and the influencing factors.
[0035] In another aspect, a grayscale compensation device is provided, comprising a processor and a communication interface. The communication interface is coupled to the processor. The processor is configured to execute a computer program or instruction to implement the grayscale compensation method of the first aspect or any embodiment of the first aspect.
[0036] In another aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer program instructions, which, when executed on a computer (eg, a receiving node), causes the computer to execute the grayscale compensation method according to any of the above embodiments.
[0037] In another aspect, a computer program product is provided, which includes computer program instructions, and when the computer program instructions are executed on a computer (eg, a receiving node), the computer program instructions cause the computer to perform the grayscale compensation method according to any of the above embodiments.
[0038] In another aspect, a computer program is provided. When the computer program is executed on a computer (eg, a receiving node), the computer program causes the computer to execute the grayscale compensation method according to any one of the above embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] To more clearly illustrate the technical solutions of the present disclosure, the following briefly introduces the drawings required for use in some embodiments of the present disclosure. Obviously, the drawings described below are only drawings of some embodiments of the present disclosure, and those skilled in the art can also derive other drawings based on these drawings. Furthermore, the drawings described below are schematic diagrams and are not intended to limit the actual dimensions of the products, actual processes of the methods, actual timing of signals, and the like involved in the embodiments of the present disclosure.
[0040] FIG1 is a block diagram of an electronic device according to some embodiments;
[0041] FIG2 is a schematic diagram of multiple backlight partitions according to some embodiments;
[0042] FIG3 is a schematic diagram of a processor according to some embodiments;
[0043] FIG4 is a schematic diagram of a storage method according to some embodiments;
[0044] FIG5 is a block diagram of a lookup table control module according to some embodiments;
[0045] FIG6 is a structural diagram of a lookup table control module according to some other embodiments;
[0046] FIG7 is a schematic diagram of a difference operation circuit according to some embodiments;
[0047] FIG8 is a schematic diagram of a matrix buffer of a backlight matrix control module according to some embodiments;
[0048] FIG9 is a schematic diagram of a matrix initialization buffer according to some embodiments;
[0049] FIG10 is a schematic diagram of a multiplication array of a convolution calculation module according to some embodiments;
[0050] FIG11 is a schematic diagram of an adder tree array according to some embodiments;
[0051] FIG12 is a flow chart of a grayscale compensation method according to some embodiments;
[0052] FIG13 is a schematic diagram of point spread coefficient according to some embodiments;
[0053] FIG14 is a schematic diagram illustrating correspondence between backlight values and weight values of multiple backlight subareas according to some embodiments;
[0054] FIG15 is a flow chart of a grayscale compensation method according to some other embodiments;
[0055] FIG16 is a structural diagram of a grayscale compensation device according to some embodiments;
[0056] FIG. 17 is a structural diagram of a grayscale compensation device according to some embodiments. DETAILED DESCRIPTION
[0057] The following will be combined with the accompanying drawings to clearly and completely describe the technical solutions in some embodiments of the present disclosure. Obviously, the embodiments described are only some embodiments of the present disclosure, not all embodiments. Based on the embodiments provided by the present disclosure, all other embodiments obtained by ordinary technicians in this field are within the scope of protection of the present disclosure.
[0058] Unless the context requires otherwise, throughout the specification and claims, the term "comprise" and its other forms, such as the third person singular form "comprises" and the present participle form "comprising", are to be interpreted as open and inclusive, that is, "including, but not limited to". In the description of the specification, the terms "one embodiment", "some embodiments", "exemplary embodiments", "example", "specific example" or "some examples" are intended to indicate that the specific features, structures, materials or characteristics associated with the embodiment or example are included in at least one embodiment or example of the present disclosure. The schematic representation of the above terms does not necessarily refer to the same embodiment or example. In addition, the specific features, structures, materials or characteristics may be included in any one or more embodiments or examples in any appropriate manner.
[0059] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of the technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present disclosure, unless otherwise specified, "plurality" means two or more.
[0060] “At least one of A, B, and C” has the same meaning as “at least one of A, B, or C,” and both include the following combinations of A, B, and C: A only, B only, C only, the combination of A and B, the combination of A and C, the combination of B and C, and the combination of A, B, and C.
[0061] “A and / or B” includes the following three combinations: A only, B only, and a combination of A and B.
[0062] As used herein, the term "if" is optionally interpreted to mean "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined that" or "if [stated condition or event] is detected" are optionally interpreted to mean "upon determining" or "in response to determining" or "upon detecting [stated condition or event]" or "in response to detecting [stated condition or event]," depending on the context.
[0063] The use of "adapted to" or "configured to" herein is intended to be open and inclusive language that does not exclude devices adapted or configured to perform additional tasks or steps.
[0064] Additionally, the use of “based on” is intended to be open and inclusive, as a process, step, calculation, or other action “based on” one or more conditions or values may, in practice, be based on additional conditions or beyond values.
[0065] As used herein, “about,” “substantially,” or “approximately” includes the stated value and an average value that is within an acceptable range of deviation from the particular value, where the acceptable range of deviation is determined by one of ordinary skill in the art taking into account the measurements in question and the errors associated with the measurement of the particular quantity (i.e., the limitations of the measurement system).
[0066] As used herein, "equal" includes the stated conditions and conditions similar to the stated conditions, where the range of the similar conditions is within an acceptable range of deviation, where the acceptable range of deviation is determined by one of ordinary skill in the art taking into account the measurement in question and the errors associated with the measurement of the particular quantity (i.e., the limitations of the measurement system). "Equal" includes absolute equality and approximate equality, where the acceptable range of deviation for approximate equality can be, for example, that the difference between the two is less than or equal to 5% of either.
[0067] The following explains the terms involved in the embodiments of the present application to facilitate readers' understanding.
[0068] Liquid Crystal Display (LCD).
[0069] LCD is a type of display used in digital watches and many portable computers.
[0070] Local Dimming (LD) technology.
[0071] This technology adjusts the brightness of the display screen by controlling the brightness of the light-emitting diode (LED) backlight. Specifically, this technology can use hundreds or even thousands of LEDs to adjust the brightness of the backlight according to the brightness of the image displayed on the display. It can increase the brightness of the highlights of the display image while reducing the brightness of the dark parts of the display image, or even turning it off. This achieves the dual technical effects of saving backlight power consumption and improving contrast.
[0072] Point Spread Function (PSF).
[0073] The point spread coefficient in the embodiment of the present application is used to characterize the actual backlight diffusion effect of the backlight area.
[0074] If local dimming technology is used in LCD displays, the reduction in backlight brightness will usually lead to a decrease in pixel display brightness (usually a portion of high grayscale pixels). Therefore, a specific grayscale compensation algorithm is needed to increase pixel brightness.
[0075] The LCD pixel grayscale calculation circuit is a crucial component of the local dimming technology intellectual property (LD IP). Currently, conventional LCD pixel calculation circuits suitable for LD IP typically employ two implementation methods: 1) displaying the image's original grayscale values without any compensation; 2) using a low-precision grayscale compensation circuit to calculate grayscale values. However, these conventional solutions often suffer from low IP accuracy and poor compatibility.
[0076] In addition, conventional LD IP is difficult to be compatible with different backlight partition sizes in modes larger than 1 lane. This is because the LD IP may not fully consider the situation where pixels in different data lanes correspond to different backlight partitions in a certain clock cycle during design and implementation. Therefore, a specific pixel positioning circuit is required to support accurate positioning of different data lanes.
[0077] In view of this, an embodiment of the present application provides an electronic device, in which a processor can determine the degree of influence of the light source of each backlight partition in multiple backlight partitions on the brightness of the image displayed on the display screen, that is, the weight value of each backlight partition, and correct the grayscale value of the image displayed on the display screen based on the weight value and the backlight value, thereby achieving high-precision grayscale compensation and improving compatibility and image display effects.
[0078] The following will describe in detail the implementation of the embodiment of the present application in conjunction with the accompanying drawings.
[0079] As shown in FIG1 , FIG1 is a structural diagram of an electronic device 100 provided in an embodiment of the present application. The electronic device 100 may be a terminal device with a display screen, such as a television. The electronic device 100 may include a display screen 101 and a processor 102.
[0080] In the embodiment of the present application, an image is displayed on the display screen 101, and the display screen 101 corresponds to multiple backlight partitions (25 are taken as an example in Figure 2, but the display screen may include more or fewer backlight partitions), and one backlight partition corresponds to an area of the image.
[0081] Backlight zoning involves dividing a display's backlight source into multiple zones. Each zone can be independently controlled, enhancing both picture quality and viewing quality. By dividing the backlight source into multiple zones, the brightness of each zone can be better controlled, increasing contrast and detail. Backlight zoning also reduces screen whiteout and improves color accuracy.
[0082] For example, as shown in FIG2 , the backlight partitions in the first row may be W00, W01, W02, W03, and W04. The backlight partitions in the second row may be W10, W11, W12, W13, and W14. The backlight partitions in the third row may be W20, W21, W22, W23, and W24. The backlight partitions in the fourth row may be W30, W31, W32, W33, and W34. The backlight partitions in the fifth row may be W40, W41, W42, W43, and W44.
[0083] Correspondingly, the backlight partitions in the first column are W00, W10, W20, W30, and W40. The backlight partitions in the second column are W01, W11, W21, W31, and W41. The backlight partitions in the third column are W02, W12, W22, W32, and W42. The backlight partitions in the fourth column are W03, W13, W23, W33, and W43. The backlight partitions in the fifth column are W04, W14, W24, W34, and W44. For example, as shown in Figure 2, W22 is the target backlight partition, and W00 to W21 and W23 to W44 are neighboring backlight partitions.
[0084] It can be understood that the above W00 to W44 are identifiers of backlight partitions in the embodiment of the present application.
[0085] Exemplarily, as shown in FIG3 , the processor 102 includes but is not limited to a configurable register module, a pixel positioning module, a lookup table control module, a weight calculation module, a backlight matrix control module, a convolution calculation module, and a grayscale compensation module.
[0086] 1-1. The configurable register module stores a lookup table (LUT) for each backlight sub-zone and historical grayscale values for multiple image channels. This configurable register module can use multiple storage methods. Specifically, as shown in Figure 4, two storage methods are proposed: register storage and static random access memory (SRAM).
[0087] It can be understood that the lookup table (LUT1~LUTN) in the embodiment of the present application is a two-dimensional lookup table measured based on the point spread function, and the two dimensions in the two-dimensional lookup table correspond to the longitudinal (Vertical, V) direction (direction) and the horizontal (Horizontal, H) direction (direction). The content of the lookup table of each neighborhood backlight partition includes the point spread function of the backlight light source of the target backlight partition diffused to the neighborhood backlight partition at different distances in the longitudinal and transverse directions. Since the size of the lookup table (LUT1~LUTN) is determined by the size of the supportable backlight partition, when the size of the backlight partition is larger than the preset size, the size of the lookup table can be adaptively reduced. For example, a backlight partition has 200 pixels (pixels) in both the transverse and longitudinal directions, and an interpolation node can be set for every 8 pixels, then the size of the lookup table is 200 / 8, that is, the lookup table includes 25 rows and 25 columns.
[0088] It is worth noting that the interpolation nodes of the lookup tables (LUT1-LUTN) in the embodiment of the present application are described using 8 pixels as an example, and the embodiment of the present application does not limit the number of pixels of the interpolation nodes.
[0089] 1-2. The pixel positioning module can be used to provide the location of the pixel point in the corresponding data lane in the target backlight partition, the coordinate distance from the neighboring backlight partition to the target pixel point, and the index value of the neighboring backlight partition. A backlight partition includes multiple pixels. In the embodiments of the present application, the target pixel point can be any pixel point in the target backlight partition.
[0090] In the embodiment of the present application, since in the N*lane (N>1) mode, a certain clock cycle may span two backlight partitions, the pixel positioning module also needs to provide information on the partitions to which all data lanes belong.
[0091] As an example, Table 1 below shows the correspondence between different clock cycles (clk) and data (lanes) with backlight partitions, assuming a backlight partition size of 17 pixels and an IP of 8 lanes. This correspondence indicates that as clk increases, there is no fixed pattern for which backlight partition a particular data lane belongs to. Therefore, independent counting control is required for each of the eight data lanes.
[0092] Table 1
[0093] As another example, as shown in Table 2 below, when the backlight partition size is 17 pixels / 18 pixels alternatingly arranged and the IP is 8*lane, another correspondence between different clks, data lanes, and backlight partitions is shown. This correspondence also shows that as clk increases over time, there is no fixed pattern for determining which backlight partition a specific data lane belongs to. In addition, the backlight partition specifications and arrangement supported by the circuit in the pixel positioning module can be pre-set. It should be noted that the backlight partition specifications in the horizontal or vertical direction can support multiple specifications.
[0094] Table 2
[0095] 1-3. The lookup table control module can realize the row selection of the lookup table of different backlight partitions. That is, according to the longitudinal distance in the coordinate distance from the neighborhood backlight partition to the target pixel point, the corresponding row of the lookup table is selected, and then the two-dimensional lookup table is reduced to a one-dimensional lookup table. As shown in Figure 5, the dotted box is a lookup table for a neighborhood backlight partition, and lut1-row0 to lut1-rown in the dotted box are the data from row 0 to row n of the lookup table (LUT1) corresponding to a neighborhood backlight partition. The lookup table control module can filter out specific rows in the lookup table (LUT1) according to the longitudinal distance in the coordinate distance from the neighborhood backlight partition to the target pixel point, that is, the storage data of specific rows in the lookup table (LUT1) can be filtered through a multiplexer (MUX), which is to say that the two-dimensional lookup table is reduced to a one-dimensional lookup table.
[0096] The lookup table control module is further configured to use a multiplexer to select a specific column in a specific row based on the horizontal distance between the coordinates of the neighboring backlight partition and the target pixel point, thereby determining the point spread coefficient of the neighboring backlight partition. Specifically, as shown in Figure 6, the lookup table control module can store the selected row data in registers (LUT1-buffer0-ab) and (LUT1-buffer0-cd), and then determine multiple point spread coefficients of the neighboring backlight partition based on the horizontal distance and the multiplexer, such as a, b, c, and d.
[0097] It can be understood that in FIG6 , element-0 to element-m in register (LUT1-buffer0-ab) and register (LUT1-buffer0-cd) are column data corresponding to a specific row.
[0098] 1-4. The weight calculation module can calculate the weight value corresponding to each neighborhood backlight partition according to the point diffusion coefficient of each neighborhood backlight partition.
[0099] For example, as shown in FIG7 , an embodiment of the present application provides a difference operation circuit for a weight calculation module, which includes multiple cutoffs, multiple subtractors, and multiple multipliers. The point spread coefficients of the neighboring backlight partitions can be used as inputs to the difference operation circuit, and the output of the difference operation circuit is a first weight value for the neighboring backlight partitions.
[0100] It is understood that the point spread coefficient of each neighborhood backlight partition can be input into the circuit to calculate the weight value. For example, taking neighborhood backlight partition W32 as an example, the point spread coefficient a and point spread coefficient c of neighborhood backlight partition W32 are input into the first subtractor (Subtractor). The resulting difference is multiplied by mod-v-3 and then input into the first truncation (Cut_off) to obtain an integer value. Then, the point spread coefficient a and this integer value are input into the second subtractor to obtain the intermediate variable e. This intermediate variable e can be understood as the intermediate value between the point spread coefficient a and the point spread coefficient c.
[0101] Correspondingly, when the point spread coefficients a and c of the neighboring backlight partition W32 are input into the first subtractor, the point spread coefficients b and d are also input into the third subtractor. The resulting difference is multiplied by mod-v-3 and then input into the second truncation device (Cut_off) to obtain an integer value. Furthermore, the point spread coefficient b and this integer value are input into the fourth subtractor to obtain an intermediate variable f. This intermediate variable f can be understood as the intermediate value between the point spread coefficients b and d.
[0102] After obtaining the intermediate variables e and f, the two intermediate variables are input into the fifth subtractor, and the obtained difference is multiplied by mod-v-2 and input into the third truncation device (Cut_off) to obtain an integer value. Then, the intermediate variable e and the integer value are input into the sixth subtractor, and the obtained difference is the weight value of the neighborhood backlight partition W32.
[0103] 1-5. The backlight matrix control module is used to provide the backlight values of multiple backlight partitions to the convolution calculation module. That is, the backlight matrix control module can extract the backlight values of multiple backlight partitions in the target backlight partition, centered on the target backlight partition, and cache them in the register bl-reg-buffer.
[0104] For example, as shown in Figure 8, an embodiment of the present application provides a schematic diagram of a matrix cache of a backlight matrix control module. For example, the embodiment of the present application provides 5*6 cache matrices, each of which stores the backlight value of a corresponding backlight partition. Among them, bl-reg-00 stores the backlight value of backlight partition W00, and bl-reg-01 stores the backlight value of backlight partition W01. It will be understood that the embodiment of the present application does not limit the number of cache matrices.
[0105] Since one clock cycle (clk) spans two backlight partitions, the number of backlight values cached in the backlight matrix control module needs to be greater than the number of backlight partitions, that is, the cached backlight values in the backlight matrix control module need to include the backlight values of multiple backlight partitions. For example, assuming that there are 5*5 backlight partitions, the backlight matrix control module needs to cache 5*6 backlight values. When there is a cross-partition situation, bl-reg-00 to bl-reg-44 in the first dotted box in Figure 8 correspond to the previous backlight partition, and bl-reg-01 to bl-reg-45 in the second dotted box correspond to the next backlight partition, avoiding the situation where the backlight value cannot be provided in time due to the existence of spanning two backlight partitions.
[0106] For example, as shown in Figure 9, an embodiment of the present application also provides a schematic diagram of matrix initialization cache. The data stored in the initialization cache matrix refers to the 5*6 cache matrix in Figure 8. When an updated row of image data arrives, 5*6 initialization cache data (backlight values) are assigned to the 5*6 cache matrix shown in Figure 8 at one time. The purpose is to complete the data refresh time within 1 clock cycle when the row switches, avoiding excessive delays. Otherwise, it takes 30 clock cycles to complete the initialization of the 5*6 cache matrix.
[0107] Specifically, the backlight matrix control module works as follows: first, when the image data row of the display screen starts, the corresponding 30 backlight values are stored in the 5*6 initialization cache matrix, and secondly, the 5*6 initialization cache matrix data is assigned to the 5*6 cache matrix shown in Figure 7.
[0108] As pixels are transmitted, whenever partitions are switched horizontally, the corresponding backlight values are stored in bl_buffer_reg as shown in FIG7 , and then a column of 1*5 data is assigned to the cache matrix as shown in FIG8 at one time when the partitions are crossed.
[0109] When the pixels are transferred to the end of a row, it is necessary to determine whether the backlight partition where the next row of pixels is located belongs to the current backlight partition. If not, the 1*5 data of the new row of backlight partitions are assigned to the 5*6 initialization cache matrix shown in Figure 9 using the row blanking time in the h_blanking area; if so, the 5*6 initialization cache matrix data are continued to be assigned to the 5*6 cache matrix shown in Figure 8.
[0110] The convolution calculation module is configured to perform a convolution calculation on the backlight values of the multiple backlight sub-zones provided by the backlight matrix control module and the weight values of the multiple backlight sub-zones provided by the weight calculation module to obtain an equivalent backlight value for the image. For example, the equivalent backlight value for the image is calculated by performing a weighted summation of the multiple weight values and the backlight value.
[0111] Exemplarily, as shown in Figure 10, an embodiment of the present application provides a schematic diagram of a multiplication array of a convolution calculation module. The embodiment of the present application can perform weighted summation on the backlight values and weight values of multiple backlight partitions to obtain an equivalent backlight value of the image. For example, the convolution calculation module can multiply the backlight value bl00 of the backlight partition W00 by the weight value q00 of the backlight partition W00 to obtain the product value bl00byw00 of the backlight partition W00. Similarly, the convolution calculation module can also multiply the backlight value bl01 of the backlight partition W01 by the weight value q01 of the backlight partition W01 to obtain the product value bl01byw01 of the backlight partition W01. In the above manner, the product values of backlight partitions W00 to backlight partition W44 are obtained.
[0112] After obtaining the product values of backlight sub-regions W00 to W44 using the method shown in FIG10 , the convolution calculation module in the embodiment of the present application can output a sum-psf through an addition tree array as shown in FIG11 , which adds the product values of backlight sub-regions W00 to W44 to obtain the equivalent backlight value of the image. The addition tree is implemented in a multi-stage pipeline manner, which can improve the circuit's operating speed.
[0113] The grayscale compensation module is used to compensate the historical grayscale value of the image through the equivalent backlight value determined by the convolution calculation module, so as to obtain the image grayscale value.
[0114] In the embodiment of the present application, the processor 102 can be a chip. Chips can include five major categories: logic chips, memory chips, sensor chips, power chips, and communication chips. Among them, the processor category mainly performs specific computing and control tasks in the system, such as MCU, CPU, GPU, NPU, etc. The storage category mainly performs data storage in the system, as well as some storage controller chips 301, such as DRAM, SRAM, Flash, etc. The sensor category mainly performs information collection, presentation, and interaction in the system, such as input and output devices, some signal processing chips, etc. The communication category (wired and wireless) mainly performs communication functions in the system, such as some Ethernet chips, switching chips, wide area and local area network, point-to-point and ad hoc network chips, as well as filtering, amplification, power and other devices that assist in communication can all fall into this category. Commonly known WiFi, Bluetooth, 5G baseband, GPS, NB-IoT, network cards, switches, etc. can all be classified into this category.
[0115] The technical solutions of the embodiments of the present application can be applied to any communication system that supports communication, and the communication system can be a 3GPP high-frequency wireless communication system, for example, a 4th generation (4G) mobile communication system, such as a long term evolution (LTE) system, an evolved LTE (eLTE), a world-wide interoperability for microwave access (WiMAX) communication system, a fifth generation (5G) mobile communication system, such as a new radio (NR) system, a new radio access technology (NR), and future communication systems such as a sixth generation (6G) mobile communication system, etc., and can also be a non-3GPP communication system without limitation.
[0116] It should be noted that the electronic device described in the embodiment of the present application is intended to more clearly illustrate the technical solution of the embodiment of the present application, and does not constitute a limitation on the technical solution provided in the embodiment of the present application. Ordinary technicians in this field can know that with the evolution of electronic devices and the emergence of other electronic devices, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems.
[0117] The methods in the following embodiments can all be implemented in the electronic device 400 having the above hardware structure. In the following embodiments, the methods of the embodiments of the present application are described by taking the electronic device 400 as a television as an example.
[0118] The grayscale compensation method provided by the embodiment of the present application is described in detail below with reference to the accompanying drawings.
[0119] The grayscale compensation method of the embodiment of the present application can be applied to grayscale compensation of images displayed on a television. As shown in Figure 12, the grayscale compensation method may include S1201-S1202. Among them, S1201 can also be referred to as the "determining different backlight partition weight values" process, and S1202 can be referred to as the "determining grayscale values" process. S1201-S1202 are described in detail below.
[0120] S1201: Determine a weight value of each backlight partition among a plurality of backlight partitions.
[0121] In an embodiment related to the present application, the multiple backlight partitions include a target backlight partition and multiple neighboring backlight partitions of the target backlight partition, and the multiple neighboring backlight partitions are partitions affected by the backlight light source of the target backlight partition. The weight value of the backlight partition is used to indicate the degree of influence of the light source of the backlight partition on the brightness of the image displayed on the display screen. The weight value of the backlight partition may also include: a first weight corresponding to each of the multiple neighboring backlight partitions, and a second weight corresponding to the target backlight partition.
[0122] For example, as shown in Figure 2, assuming that the target backlight partition is the target backlight partition W22, the neighborhood backlight partitions include neighborhood backlight partition W00, neighborhood backlight partition W01, neighborhood backlight partition W02, neighborhood backlight partition W03, neighborhood backlight partition W04, neighborhood backlight partition W10, neighborhood backlight partition W11, neighborhood backlight partition W12, neighborhood backlight partition W13, neighborhood backlight partition W14, neighborhood backlight partition W20, neighborhood backlight partition W21, neighborhood backlight partition W23, neighborhood backlight partition W24, neighborhood backlight partition W30, neighborhood backlight partition W31, neighborhood backlight partition W32, neighborhood backlight partition W33, neighborhood backlight partition W34, neighborhood backlight partition W40, neighborhood backlight partition W41, neighborhood backlight partition W42, neighborhood backlight partition W43, and neighborhood backlight partition W44.
[0123] In an embodiment of the present application, the electronic device can obtain the point spread coefficient of each of the above-mentioned neighborhood backlight partitions, and determine the corresponding first weight based on the point spread coefficient of each neighborhood backlight partition, and then determine the second weight corresponding to the target backlight partition based on the first weight of each neighborhood backlight partition.
[0124] The point spread coefficient is used to represent the degree of influence of the light source of the neighboring backlight partition on the target pixel. The greater the distance between the target pixel and the neighboring backlight partition, the smaller the point spread coefficient of the neighboring backlight partition. The target pixel is any pixel in the target backlight partition. For example, as shown in Figure 2, the target pixel is a pixel in the target backlight partition W22.
[0125] Exemplarily, the electronic device may obtain the point spread coefficient of each neighborhood backlight partition in any one of the following cases (1) and (2).
[0126] Case (1): When the size of the lookup table of each neighborhood backlight partition satisfies a preset condition, the electronic device can determine the corresponding point spread coefficient by the coordinate distance from each neighborhood backlight partition to the target pixel point.
[0127] The lookup table size meeting a preset condition may include: the lookup table size being smaller than a preset size. The preset size is preset based on the size of the backlight partition or determined based on model training adjustments. The preset size may be automatically set by the electronic device or manually set by the user.
[0128] In one scenario, if a backlight partition has 50 pixels in the horizontal direction and 50 pixels in the vertical direction, the lookup table size corresponding to the backlight partition is 50*50, which is smaller than the preset size of 100*100. The electronic device can determine the corresponding point spread coefficient based on the coordinate distance of each neighboring backlight partition.
[0129] For example, the electronic device may determine the row according to the horizontal distance Hinner from the neighborhood backlight partition W20 to the target pixel, and calculate a point spread coefficient of the neighborhood backlight partition W20 according to the vertical distance Vinner.
[0130] It is worth noting that in the above case (1), the point spread coefficient is determined according to the coordinate distance. Since the coordinate distance includes the horizontal distance and the vertical distance, only one point spread coefficient can be determined based on the horizontal distance and the vertical distance. Then, the electronic device can find the weight value of the neighboring backlight partition W20 according to the one point spread coefficient.
[0131] Case (2): When the size of the lookup table for each neighborhood backlight partition does not meet a preset condition, that is, the size of the lookup table is greater than or equal to the preset size, the electronic device may determine, for each neighborhood backlight partition, a point spread coefficient of the neighborhood backlight partition based on the index value of the neighborhood backlight partition and the preset correspondence.
[0132] Among them, one neighborhood backlight partition corresponds to multiple index values, the preset corresponding relationship includes multiple sub-diffusion coefficients, and one sub-diffusion coefficient corresponds to any two index values among the multiple index values.
[0133] In one scenario, if the number of pixels in the horizontal direction of the neighborhood backlight partition W00 is 100 and the number of pixels in the vertical direction is 100, then the lookup table size 100*100 corresponding to the neighborhood backlight partition is equal to the preset size 100*100. The electronic device can determine the point spread coefficient of the neighborhood backlight partition W00 based on multiple index values of the neighborhood backlight partition W00. The number of the multiple index values is equal to the number of the point spread coefficients.
[0134] Exemplarily, the neighborhood backlight partition W00 corresponds to four index values, namely Index_up_0, Index_down_0, Index_left_0, and Index_right_0.
[0135] As shown in Figure 13, the point spread coefficient a of the neighborhood backlight partition W00 is determined by the electronic device based on the index value Index_up_0 combined with the index value Index_left_0. For example, a=LUT1(Index_up_0*1+Index_left_0). Wherein, LUT1 is the lookup table of the neighborhood backlight partition W00.
[0136] The point spread coefficient b of the neighborhood backlight partition W00 is determined by the electronic device according to the index value Index_up_0 and the index value Index_right_0. For example, b=LUT1(Index_up_0*1+Index_right_0).
[0137] The point spread coefficient c of the neighboring backlight partition W00 is determined by the electronic device according to the index value Index_down_0 and the index value Index_left_0. For example, c=LUT1(Index_down_0*1+Index_left_0).
[0138] The point spread coefficient d of the neighborhood backlight partition W00 is determined by the electronic device according to the index value Index_down_0 and the index value Index_right_0. For example, d=LUT1(Index_down_0*1+Index_right_0).
[0139] In another scenario, assume that the preset size is 100*100. If the number of pixels (pixels) in the horizontal direction of the neighborhood backlight partition W32 is 200 and the number of pixels (pixels) in the vertical direction is 200, then the lookup table size 200*200 corresponding to the neighborhood backlight partition is larger than the preset size 100*100, that is, the number of point spread coefficients in the lookup table is too large, which will lead to a long delay in obtaining the point spread coefficient and too much stored data. The electronic device can determine the point spread coefficient of the neighborhood backlight partition W32 according to the multiple index values of the neighborhood backlight partition W32. The number of multiple index values is equal to the number of point spread coefficients.
[0140] For example, the neighborhood backlight partition W32 corresponds to four index values, namely Index_up_3, Index_down_3, Index_left_2, and Index_right_2.
[0141] The point spread coefficient a of the neighboring backlight partition W32 is determined by the electronic device based on the index value Index_up_3 combined with the index value Index_left_2. For example, a=LUT6(Index_up_3*6+Index_left_2). Wherein, LUT6 is the lookup table corresponding to the neighboring backlight partition W32.
[0142] The point spread coefficient b of the neighboring backlight partition W32 is determined by the electronic device according to the index value Index_up_3 combined with the index value Index_right_2. For example, b=LUT6(Index_up_3*6+Index_right_2).
[0143] The point spread coefficient c of the neighboring backlight partition W32 is determined by the electronic device according to the index value Index_down_3 combined with the index value Index_left_2. For example, c=LUT6(Index_down_3*6+Index_left_2).
[0144] The point spread coefficient d of the neighboring backlight partition W32 is determined by the electronic device according to the index value Index_down_3 combined with the index value Index_right_2. For example, d=LUT6(Index_down_3*6+Index_right_2).
[0145] For another example, the neighboring backlight partition W21 corresponds to four index values, namely Index_up_2, Index_down_2, Index_left_1, and Index_right_1.
[0146] The point spread coefficient a of the neighboring backlight partition W21 is determined by the electronic device based on the index value Index_up_2 combined with the index value Index_left_1. For example, a = LUT5(Index_up_2*5+Index_left_1). LUT5 is the lookup table corresponding to the neighboring backlight partition W21. The point spread coefficient b of the neighboring backlight partition W21 is determined by the electronic device based on the index value Index_up_2 combined with the index value Index_right_1. For example, b = LUT5(Index_up_2*5+Index_right_1).
[0147] The point spread coefficient c of the neighboring backlight partition W21 is determined by the electronic device according to the index value Index_down_2 combined with the index value Index_left_1. For example, c=LUT5(Index_down_2*5+Index_left_1).
[0148] The point spread coefficient d of the neighboring backlight partition W21 is determined by the electronic device according to the index value Index_down_2 combined with the index value Index_right_1. For example, d=LUT5(Index_down_2*5+Index_right_1).
[0149] It can be understood that in the embodiment of the present application, one neighborhood light partition corresponds to one lookup table. For example, the lookup tables (LUT1~LUTN) in the embodiment of the present application are based on 6*6 as an example. Specifically, as shown in Figure 2, the lookup table corresponding to the neighborhood backlight partition W00, the neighborhood backlight partition W04, the neighborhood backlight partition W40, and the neighborhood backlight partition W44 is LUT1. The lookup table corresponding to the neighborhood backlight partition W10, the neighborhood backlight partition W14, the neighborhood backlight partition W30, and the neighborhood backlight partition W34 is LUT2. The lookup table corresponding to the neighborhood backlight partition W20 and the neighborhood backlight partition W24 is LUT3. The lookup table corresponding to the neighborhood backlight partition W11, the neighborhood backlight partition W13, the neighborhood backlight partition W31, and the neighborhood backlight partition W33 is LUT4. The lookup table corresponding to the neighborhood backlight partition W21 and the neighborhood backlight partition W23 is LUT5. The lookup table corresponding to the neighboring backlight partition W12 and the neighboring backlight partition W32 is LUT6.
[0150] It is worth noting that the size of the lookup table is determined by the width of the backlight partition divided by the interpolation node distance, and the embodiment of the present application does not limit the size of the lookup table.
[0151] In summary, the point spread coefficient of each neighborhood backlight partition determined in case (2) is more accurate than that in case (1). Accordingly, the weight of the corresponding neighborhood backlight partition obtained based on the point spread coefficient of each neighborhood backlight partition in case (2) is more accurate. For example, the electronic device will obtain the point spread coefficients of 24 neighborhood backlight partitions, namely W00 to W21 and W23 to W44.
[0152] The following summarizes how to determine the weight of the corresponding neighborhood backlight partition based on the multiple point diffusion coefficients of each neighborhood backlight partition obtained in case (2).
[0153] In the embodiment of the present application, the electronic device may determine the first weight of the neighborhood backlight partition according to multiple sub-diffusion coefficients and a preset difference algorithm.
[0154] For example, taking the aforementioned neighborhood backlight partition W32 as an example, as shown in FIG13 , the electronic device can substitute the point spread coefficient a and the point spread coefficient b of the neighborhood backlight partition W32 into the difference calculation formula in the preset difference algorithm to calculate the intermediate variable e between the point spread coefficient a and the point spread coefficient b. For example, e = a - int([(ac)*mod_v_3] / 8+0.5). Here, mod_v_3 is the modulus operation in the longitudinal direction.
[0155] At the same time, the electronic device substitutes the point spread coefficient c and the point spread coefficient d into the difference calculation formula in the preset difference algorithm to calculate the intermediate variable f between the point spread coefficient c and the point spread coefficient d. For example, e=b-int([(bd)*mod_v_3] / 8+0.5).
[0156] After the electronic device obtains the intermediate variables e and f, the first weight of the neighborhood backlight partition W32 satisfies the following formula 1: W32 权重 =e-int([(ef)*mod_h_2] / 8+0.5) where mod_h_2 is the modulus operation in the horizontal direction.
[0157] As another example, using the aforementioned neighborhood backlight partition W21 as an example, the electronic device can substitute the point spread coefficient a and the point spread coefficient b of the neighborhood backlight partition W21 into the difference calculation formula in the preset difference algorithm to calculate the intermediate variable e between the point spread coefficient a and the point spread coefficient b. For example, e = a - int([(ac)*mod_v_2] / 8+0.5). Here, mod_v_2 is the longitudinal modulus operation.
[0158] At the same time, the electronic device substitutes the point spread coefficient c and the point spread coefficient d into the difference calculation formula in the preset difference algorithm to calculate the intermediate variable f between the point spread coefficient c and the point spread coefficient d. For example, e=b-int([(bd)*mod_v_2] / 8+0.5).
[0159] After the electronic device obtains the intermediate variables e and f, the first weight of the neighborhood backlight partition W32 satisfies the following formula 1: W32 权重 =e-int([(ef)*mod_h_1] / 8+0.5) where mod_h_1 is the modulo operation in the horizontal direction.
[0160] It is worth noting that the embodiment of the present application provides a weight remainder operation rule as shown in Table 3 below.
[0161] Table 3
[0162] In Table 2, % is the remainder symbol in binary; >> is the symbol for shifting binary data right by 1 bit; and << is the symbol for shifting binary data left by 1 bit.
[0163] In the embodiment of the present application, each neighborhood backlight partition can determine a corresponding weight based on the above-mentioned remainder operation rule and the preset difference algorithm. For example, as shown in Figure 2, the electronic device can obtain the first weight values of W00-W21, W23-W44, a total of 24 neighborhood backlight partitions.
[0164] It should be noted that, since the sum of the first weights of multiple neighboring backlight partitions and the second weight of the target backlight partition is 1, the electronic device can obtain the second weight of the target backlight partition by subtracting the sum of the first weights of multiple neighboring backlight partitions from 1.
[0165] It is understandable that in the embodiment of the present application, since there are too many pixels in the backlight partition, an interpolation node is set for every 8 pixels, so it is necessary to divide by 8 in the process of calculating the neighborhood backlight weight.
[0166] S1202 : Determine the grayscale value of the image according to the backlight values and weight values of the multiple backlight subareas.
[0167] The grayscale value of the image can be used to adjust the image display effect.
[0168] In one possible implementation, the electronic device can determine the equivalent backlight value of the image based on the backlight values and weight values of multiple backlight partitions, and determine the display grayscale value of the target pixel point of the image based on the equivalent backlight value and the historical grayscale value of the target pixel point of the image.
[0169] The equivalent backlight value is a backlight value used to correct the brightness of a target pixel in the image.
[0170] In an embodiment of the present application, the electronic device can perform a weighted summation of the backlight values and weight values of multiple backlight partitions to determine the equivalent backlight value of the target pixel of the image. Then, the electronic device corrects the historical grayscale value of the target pixel of the image according to the equivalent backlight value to determine the display grayscale value of the target pixel of the image.
[0171] Exemplarily, each backlight partition has a corresponding backlight value and weight value. For example, as shown in FIG14 , BL00 in backlight partition W00 is the backlight value of the backlight partition, and W00 is the weight value of the backlight partition; or, BL11 in backlight partition W11 is the backlight value of the backlight partition, and W11 is the weight value of the backlight partition.
[0172] For example, the electronic device substitutes the backlight values of backlight partitions W00 to W44 and the corresponding weight values into the following formula 2 to calculate an equivalent backlight value, which satisfies the following formula 2: (BL00*W00+BL01*W01+…BL44*W44) Formula 2.
[0173] It is worth noting that the backlight value used by the electronic device for each backlight partition can be the backlight value of the previous frame or the backlight value of the current frame. It should be noted that if the electronic device uses the backlight value of the current frame, it needs to cache the pixel values of more rows of LCD images to facilitate the reference of the backlight value of the current frame.
[0174] In an embodiment of the present application, the electronic device may further obtain historical grayscale values of multiple channels of an image, and determine the grayscale value of the image based on the historical grayscale values of the multiple channels and the equivalent backlight value.
[0175] For example, the historical grayscale values of multiple channels are R, G, and B. The electronic device can determine the backlight compensation weight com weight according to the equivalent backlight value index lookup table, and substitute the backlight compensation weight com weight and the historical grayscale values R, G, and B of multiple channels into the following formula 3: Rcom=min(int(R*com_weight / 2^9+0.5),255) Gcom=min(int(G*com_weight / 2^9+0.5),255) Formula 3 Bcom=min(int(B*com_weight / 2^9+0.5),255)
[0176] Among them, Rcom, Gcom, and Bcom are the grayscale values after compensation of multiple channels of the image.
[0177] It should be noted that the above detailed description of the specific calculation method of each parameter involved in S1202 is for the purpose of more clearly illustrating the grayscale compensation method described in the embodiment of the present application, and should not be understood as limiting the specific implementation of the present application.
[0178] Based on the technical solution of Figure 12, the grayscale compensation method provided in the embodiment of the present application, the electronic device determines the degree of influence of the light source of each backlight partition in multiple backlight partitions on the brightness of the image displayed on the display screen, that is, the weight value of each backlight partition, and corrects the grayscale value of the image displayed on the display screen based on the weight value and the backlight value, thereby achieving high-precision grayscale compensation and improving compatibility and image quality.
[0179] In one scenario, if a backlight partition has 200 pixels in the horizontal direction and 200 pixels in the vertical direction, the lookup table corresponding to the backlight partition will be too large, that is, the number of point spread coefficients in the lookup table will be too large. Therefore, the embodiment of the present application can reduce the number of point spread coefficients by inserting index values.
[0180] In the embodiment of the present application, the electronic device may determine the index value of each neighborhood backlight partition, as shown in FIG15 , which may include the following S1501 and S1502 .
[0181] S1501: Determine a binary value corresponding to the coordinate distance from the neighborhood backlight partition to the target pixel point.
[0182] The coordinate distance includes the longitudinal distance from the neighboring backlight partition to the target pixel point and the lateral distance from the neighboring backlight partition to the target pixel point.
[0183] In an embodiment of the present application, the electronic device can convert the longitudinal distance and the lateral distance from each neighborhood backlight partition to the target pixel into binary values. Exemplarily, in conjunction with FIG2 above, the neighborhood backlight partition W00, the neighborhood backlight partition W01, the neighborhood backlight partition W02, the neighborhood backlight partition W03, and the neighborhood backlight partition W04 are in the same row, then the neighborhood backlight partition W00, the neighborhood backlight partition W01, the neighborhood backlight partition W02, the neighborhood backlight partition W03, and the neighborhood backlight partition W04 have the same longitudinal distance to the target pixel. The electronic device can only convert the longitudinal distance of one of the neighborhood backlight partitions W00, the neighborhood backlight partition W01, the neighborhood backlight partition W02, the neighborhood backlight partition W03, and the neighborhood backlight partition W04 into a binary value.
[0184] Similarly, if the neighboring backlight partitions W00, W10, W20, W30, and W40 are in the same column, the lateral distances from the target pixel to the neighboring backlight partitions W00, W10, W20, W30, and W40 are equal. The electronic device may convert only the lateral distance of one of the neighboring backlight partitions W00, W10, W20, W30, and W40 into a binary value.
[0185] For example, in combination with FIG2 , the electronic device may convert the longitudinal distance 6 from the neighborhood backlight partition W00 to the target pixel into a binary value 0110, and convert the lateral distance 16 from the neighborhood backlight partition W00 to the target pixel into a binary value 00010000.
[0186] Since the vertical distances from the neighboring backlight partitions W00, W01, W02, W03, and W04 to the target pixel are equal, when converting the coordinate distance of the neighboring backlight partition W01, the electronic device only needs to convert the horizontal distance 5 of the neighboring backlight partition W01 into a binary value of 0101. Similarly, when converting the coordinate distances of the neighboring backlight partitions W02, W03, and W04, only the horizontal distances need to be converted.
[0187] S1502: Use the preset digit value in the binary value as the index value of each neighborhood backlight partition and the target pixel point.
[0188] The multiple index values include a first index value, a second index value, a third index value, and a fourth index value.
[0189] The first index value is a preset binary digit value of the longitudinal distance, or a preset binary digit value of the first difference value; the first difference value is the difference between the partition height of the adjacent backlight partition and the longitudinal distance. The second index value is the sum of the first index value and the threshold value.
[0190] The third index value is a preset binary digit value of the horizontal distance, or a preset binary digit value of the second difference value, where the second difference value is the difference between the partition width of the adjacent backlight partition and the horizontal distance. The fourth index value is the sum of the third index value and the threshold value.
[0191] In an embodiment of the present application, the electronic device determines the index operation rules of the neighborhood backlight partitions for each neighborhood backlight partition based on the identifier of the neighborhood backlight partition to obtain the index operation rules of each neighborhood backlight partition; the index operation rules are used to determine the index values of the neighborhood backlight partitions and the target pixel points.
[0192] It can be understood that the number of point diffusion coefficients in a neighborhood backlight partition is equal to the number of index values of the neighborhood backlight partition.
[0193] For example, an embodiment of the present application provides an index operation rule in the vertical direction as shown in Table 4 below.
[0194] Table 4
[0195] In the above-mentioned index operation rules in the longitudinal direction, Vinner is the longitudinal distance from the neighboring backlight partition to the target pixel; BV is the partition height of the neighboring backlight partition; and >> is an operator for shifting binary data right by 1 bit.
[0196] For example, an embodiment of the present application provides a horizontal index operation rule as shown in Table 5 below.
[0197] Table 5
[0198] In the above-mentioned index operation rule in the horizontal direction, Hinner is the horizontal distance from the neighborhood backlight partition to the target pixel; HV is the partition width of the neighborhood backlight partition.
[0199] It can be understood that, since an interpolation node is set for every 8 pixels in the embodiment of the present application, c is 3 in the above example.
[0200] For example, as shown in FIG2 , the first 0 in the neighboring backlight partition W00 represents the index value identifier in the longitudinal direction, and the second 0 in the neighboring backlight partition W00 represents the index value identifier in the transverse direction. Combined with the index calculation rules provided in the above embodiment of the present application, the calculation rule for the index value of the neighboring backlight partition W00 in the longitudinal direction is:
[0201] Index_up_0=Vinner>>c, and Index_down_0=Index_up_0+1.
[0202] The calculation rule of the index value of the neighborhood backlight partition W00 in the horizontal direction is:
[0203] Index_left_0=Hinner>>c, and Index_right_0=Index_left_0+1.
[0204] For another example, as shown in FIG2 , the 0 in the neighboring backlight partition W01 represents the index value identifier in the longitudinal direction, and the 1 in the neighboring backlight partition W01 represents the index value identifier in the transverse direction. Combined with the index calculation rules provided in the above embodiment of the present application, the calculation rule for the index value of the neighboring backlight partition W01 in the longitudinal direction is:
[0205] Index_up_0=Vinner>>c, and Index_down_0=Index_up_0+1.
[0206] The calculation rule of the index value of the neighborhood backlight partition W01 in the horizontal direction is:
[0207] Index_left_1=Hinner>>c, and Index_right_1=Index_left_1+1.
[0208] For another example, as shown in FIG2 , the 0 in the neighboring backlight partition W02 represents the index value identifier in the longitudinal direction, and the 2 in the neighboring backlight partition W02 represents the index value identifier in the transverse direction. Combined with the index calculation rules provided in the above embodiment of the present application, the calculation rule for the index value of the neighboring backlight partition W02 in the longitudinal direction is:
[0209] Index_up_0=Vinner>>c, and Index_down_0=Index_up_0+1.
[0210] The calculation rule of the index value of the neighboring backlight partition W02 in the horizontal direction needs to determine whether the horizontal distance between the neighboring backlight partition W02 and the target pixel point is less than the partition width of the neighboring backlight partition W02.
[0211] When the lateral distance from the neighboring backlight partition W02 to the target pixel point is less than the partition width of the neighboring backlight partition W02, the calculation rule of the index value of the neighboring backlight partition W02 in the lateral direction is: Hinner<(HV>>1): Index_left_2=((HV>>1)-Hinner)>>c; Index_right_2=Index_left_2+1.
[0212] When the lateral distance from the neighboring backlight partition W02 to the target pixel point is greater than or equal to the partition width of the neighboring backlight partition W02, the calculation rule of the index value of the neighboring backlight partition W02 in the lateral direction is: Hinner≥(HV>>1): Index_left_2=(Hinner-(HV>>1))>>c; Index_right_2=Index_left_2+1.
[0213] For another example, as shown in FIG2 , the 0 in the neighborhood backlight partition W03 represents the index value identifier in the longitudinal direction, and the 3 in the neighborhood backlight partition W03 represents the index value identifier in the transverse direction. Combined with the index calculation rules provided in the above-mentioned embodiment of the present application, the calculation rule for the index value of the neighborhood backlight partition W03 in the longitudinal direction is:
[0214] Index_up_0=Vinner>>c, and Index_down_0=Index_up_0+1.
[0215] The calculation rule of the index value of the neighboring backlight partition W03 in the horizontal direction is:
[0216] Index_left_3=(HV-Hinner)>>c, and Index_right_3=Index_left_3+1.
[0217] For another example, as shown in Figure 2, the 2 in the neighborhood backlight partition W21 represents the index value identifier in the longitudinal direction, and the 1 in the neighborhood backlight partition W21 represents the index value identifier in the transverse direction. In combination with the index calculation rules provided in the above-mentioned embodiments of the present application, the calculation rules for the index value of the neighborhood backlight partition W21 in the longitudinal direction need to determine whether the longitudinal distance from the neighborhood backlight partition W21 to the target pixel point is less than the partition height of the neighborhood backlight partition W21.
[0218] When the longitudinal distance from the neighboring backlight partition W21 to the target pixel point is less than the partition height of the neighboring backlight partition W21, the calculation rule of the index value of the neighboring backlight partition W21 in the longitudinal direction is: Vinner<(BV>>1): Index_up_2=((BV>>1)-Vinner)>>c; Index_down_2=Index_up_2+1.
[0219] When the longitudinal distance from the neighboring backlight partition W21 to the target pixel point is greater than or equal to the partition height of the neighboring backlight partition W21, the calculation rule of the index value of the neighboring backlight partition W21 in the longitudinal direction is: Vinner≥(BV>>1):Index_up_2=(Vinner-(BV>>1))>>c; Index_down_2=Index_up_2+1.
[0220] The calculation rule of the index value of the neighboring backlight partition W21 in the horizontal direction is:
[0221] Index_left_1=Hinner>>c, and Index_right_1=Index_left_1+1.
[0222] For another example, as shown in FIG2 , the 3 in the neighborhood backlight partition W32 represents the index value identifier in the longitudinal direction, and the 2 in the neighborhood backlight partition W32 represents the index value identifier in the transverse direction. Combined with the index calculation rules provided in the above embodiment of the present application, the calculation rules for the index value of the neighborhood backlight partition W32 in the longitudinal direction are:
[0223] Index_up_3=(BV-Vinner)>>c, and Index_down_3=Index_up_3+1.
[0224] The calculation rule of the index value of the neighboring backlight partition W32 in the horizontal direction needs to determine whether the horizontal distance between the neighboring backlight partition W32 and the target pixel point is less than the partition width of the neighboring backlight partition W32.
[0225] When the lateral distance from the neighboring backlight partition W32 to the target pixel point is less than the partition width of the neighboring backlight partition W32, the calculation rule of the index value of the neighboring backlight partition W32 in the lateral direction is: Hinner<(HV>>1): Index_left_2=((HV>>1)-Hinner)>>c; Index_right_2=Index_left_2+1.
[0226] When the lateral distance from the neighboring backlight partition W32 to the target pixel point is greater than or equal to the partition width of the neighboring backlight partition W32, the calculation rule of the index value of the neighboring backlight partition W32 in the lateral direction is: Hinner≥(HV>>1): Index_left_2=(Hinner-(HV>>1))>>c; Index_right_2=Index_left_2+1.
[0227] Based on the above technical solution, the grayscale compensation method provided in the embodiment of the present application provides a corresponding index operation rule for each neighborhood backlight partition. After the processor converts the coordinate distance from each neighborhood backlight partition to the target pixel point into binary, it can determine the corresponding index operation rule according to the identification of each backlight partition, substitute the converted coordinate distance into the corresponding index operation rule, and calculate the index value of each neighborhood backlight partition. This can improve the efficiency of subsequent determination of the point spread coefficient, while reducing the delay and data storage memory.
[0228] It should be pointed out that the various embodiments of the present application can refer to each other, for example, the same or similar steps, method embodiments, system embodiments and device embodiments can refer to each other without limitation.
[0229] In the embodiments of the present application, the grayscale compensation device can be divided into functional modules or functional units according to the above-mentioned method examples. For example, each functional module or functional unit can be divided according to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software functional modules or functional units. The division of modules or units in the embodiments of the present application is schematic and is only a logical functional division. In actual implementation, other division methods may be used.
[0230] As shown in Figure 16, it is a structural schematic diagram of a grayscale compensation device provided in an embodiment of the present application. The device is applied to an electronic device, which includes: a display screen and a processor; the display screen is used to display an image, and the display screen corresponds to multiple backlight partitions, and one backlight partition corresponds to an area of the image; the device includes: a processing unit 1601 and a communication unit 1602.
[0231] Processing unit 1601 is configured to determine a weight value for each backlight partition in a plurality of backlight partitions; the weight value of the backlight partition is used to indicate the degree of influence of the light source of the backlight partition on the brightness of the image displayed on the display screen; processing unit 1601 is further configured to determine the grayscale value of the image based on the backlight values and weight values of the plurality of backlight partitions.
[0232] In one possible implementation, the multiple backlight partitions include a target backlight partition and multiple neighboring backlight partitions of the target backlight partition, and the multiple neighboring backlight partitions are partitions affected by the backlight light source of the target backlight partition; the weight value includes a first weight corresponding to each neighboring backlight partition in the multiple neighboring backlight partitions, and a second weight corresponding to the target backlight partition.
[0233] In one possible implementation, the communication unit 1602 is configured to obtain the point spread coefficient of each neighborhood backlight partition; the point spread coefficient is used to indicate the degree of influence of the neighborhood backlight partition light source on the target pixel point; the greater the distance from the target pixel point to the neighborhood backlight partition, the smaller the point spread coefficient of the neighborhood backlight partition; the target pixel point is any pixel point in the target backlight partition; the processing unit 1601 is further configured to determine the corresponding first weight of each neighborhood backlight partition based on the point spread coefficient of each neighborhood backlight partition; the processing unit 1601 is further configured to determine the second weight corresponding to the target backlight partition based on the first weight of each neighborhood backlight partition.
[0234] In a possible implementation, the point spread coefficient includes multiple sub-diffusion coefficients; the processing unit 1601 is specifically configured to determine the first weight of the neighborhood backlight partition according to the multiple sub-diffusion coefficients and a preset difference algorithm.
[0235] In one possible implementation, the processing unit 1601 is specifically configured to determine, for each neighborhood backlight partition, the point diffusion coefficient of the neighborhood backlight partition based on the index value of the neighborhood backlight partition and a preset correspondence; one neighborhood backlight partition corresponds to multiple index values; the preset correspondence includes multiple sub-diffusion coefficients, and one sub-diffusion coefficient corresponds to any two index values among the multiple index values.
[0236] In one possible implementation, the processing unit 1601 is further configured to determine a binary value corresponding to the coordinate distance from the neighborhood backlight partition to the target pixel point; and use the preset digit value in the binary value as the index value of each neighborhood backlight partition and the target pixel point.
[0237] In one possible implementation, the processing unit 1601 is further configured to determine, for each neighborhood backlight partition, an index operation rule of the neighborhood backlight partition based on the identifier of the neighborhood backlight partition, so as to obtain an index operation rule of each neighborhood backlight partition; the index operation rule is used to determine the index value of the neighborhood backlight partition and the target pixel point.
[0238] In one possible implementation, the coordinate distance includes the longitudinal distance from the neighboring backlight partition to the target pixel point and the lateral distance from the neighboring backlight partition to the target pixel point; the multiple index values include a first index value, a second index value, a third index value, and a fourth index value; the first index value is: the binary value of the longitudinal distance on a preset digit, or the binary value of the first difference on a preset digit; the first difference is the difference between the partition height of the neighboring backlight partition and the longitudinal distance; the second index value is: the sum of the first index value and the threshold; the third index value is: the binary value of the lateral distance on a preset digit, or the binary value of the second difference on a preset digit; the second difference is the difference between the partition width of the neighboring backlight partition and the lateral distance; the fourth index value is: the sum of the third index value and the threshold.
[0239] In one possible implementation, the processing unit 1601 is further configured to determine an equivalent backlight value of the image based on the backlight values and weight values of multiple backlight partitions; the equivalent backlight value is a backlight value used to correct the brightness of the image; and based on the equivalent backlight value, determine the grayscale value of the image.
[0240] In a possible implementation, the processing unit 1601 is specifically configured to obtain historical grayscale values of multiple channels of an image; and determine the grayscale value of the image based on the historical grayscale values of the multiple channels and the equivalent backlight value.
[0241] In a possible implementation, a plurality of backlight values are cached in the processor, and the plurality of backlight values include backlight values of a plurality of backlight partitions.
[0242] In a possible implementation, the sum of the first weights of the multiple neighboring backlight partitions and the second weight of the target backlight partition is 1.
[0243] When implemented through hardware, the communication unit 1602 in the embodiment of the present application can be integrated into a communication interface, and the processing unit 1601 can be integrated into a processor. The specific implementation is shown in FIG17 .
[0244] Figure 17 shows another possible structural diagram of the grayscale compensation device involved in the above-mentioned embodiment. The communication device includes a processor 1702 and a communication interface 1703. Processor 1702 is used to control and manage the operation of the device, for example, executing the steps performed by the processing unit 1601 and / or performing other processes of the technology described herein. Communication interface 1703 is used to support communication between the device and other network entities, for example, executing the steps performed by the communication unit 1602. The device may also include a memory 1701 and a bus 1704. Memory 1701 is used to store program code and data of the device.
[0245] Among them, the memory 1701 can be a memory in the device, etc., and the memory can include a volatile memory, such as a random access memory; the memory can also include a non-volatile memory, such as a read-only memory, a flash memory, a hard disk or a solid-state drive; the memory can also include a combination of the above types of memory.
[0246] The processor 1702 may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure herein. The processor may be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field-programmable gate array, or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof. The processor may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure herein. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, or a combination of a DSP and a microprocessor.
[0247] Bus 1704 may be an Extended Industry Standard Architecture (EISA) bus, etc. Bus 1704 may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, FIG17 shows only one thick line, but this does not mean that there is only one bus or only one type of bus.
[0248] The device in FIG17 may also be a chip, which includes one or more (including two) processors 1702 and a communication interface 1703 .
[0249] Optionally, the chip further includes a memory 1705, which may include a read-only memory and a random access memory, and provides operation instructions and data to the processor 1702. A portion of the memory 1705 may also include a non-volatile random access memory (NVRAM).
[0250] In some embodiments, the memory 1705 stores the following elements, execution modules or data structures, or a subset thereof, or an extended set thereof.
[0251] In the embodiment of the present application, the corresponding operation is performed by calling the operation instruction stored in the memory 1705 (the operation instruction may be stored in the operating system).
[0252] Some embodiments of the present disclosure provide a computer-readable storage medium (e.g., a non-transitory computer-readable storage medium), which stores computer program instructions. When the computer program instructions are executed on a computer (e.g., a receiving node), the computer executes a synchronization method as in any of the above embodiments.
[0253] Exemplarily, the above-mentioned computer-readable storage media may include, but are not limited to: magnetic storage devices (e.g., hard disks, floppy disks, or magnetic tapes, etc.), optical disks (e.g., CDs (Compact Disks), DVDs (Digital Versatile Disks), etc.), smart cards, and flash memory devices (e.g., EPROMs (Erasable Programmable Read-Only Memory), cards, sticks, or key drives, etc.). The various computer-readable storage media described in the present disclosure may represent one or more devices and / or other machine-readable storage media for storing information. The term "machine-readable storage medium" may include, but is not limited to, wireless channels and various other media capable of storing, containing, and / or carrying instructions and / or data.
[0254] Some embodiments of the present disclosure further provide a computer program product, for example, stored on a non-transitory computer-readable storage medium. The computer program product includes computer program instructions that, when executed on a computer (e.g., a receiving node), cause the computer to perform the synchronization method described in the above embodiments.
[0255] Some embodiments of the present disclosure further provide a computer program. When the computer program is executed on a computer (eg, a receiving node), the computer program enables the computer to execute the synchronization method of the above embodiments.
[0256] The beneficial effects of the above-mentioned computer-readable storage medium, computer program product and computer program are the same as the beneficial effects of the synchronization method of some of the above-mentioned embodiments, and will not be repeated here.
[0257] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0258] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0259] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0260] The above are only specific embodiments of the present disclosure, but the scope of protection of the present disclosure is not limited thereto. Any changes or substitutions that a person skilled in the art can conceive within the technical scope disclosed in this disclosure should be included in the scope of protection of the present disclosure. Therefore, the scope of protection of the present disclosure should be based on the scope of protection of the claims.
Claims
1. An electronic device, wherein: The electronic device includes: a display screen and a processor; the display screen is used to display an image, and the display screen corresponds to a plurality of backlight partitions, each backlight partition corresponding to an area of the image; The processor is configured to: determine a weight value of each backlight partition among the multiple backlight partitions; the weight value of the backlight partition is used to represent the degree of influence of the light source of the backlight partition on the brightness of the image displayed on the display screen; The processor is configured to determine a grayscale value of the image according to backlight values and weight values of the plurality of backlight subareas.
2. The electronic device according to claim 1, wherein The multiple backlight partitions include a target backlight partition and multiple neighboring backlight partitions of the target backlight partition, and the multiple neighboring backlight partitions are partitions affected by the backlight light source of the target backlight partition; the weight value includes a first weight corresponding to each neighboring backlight partition in the multiple neighboring backlight partitions, and a second weight corresponding to the target backlight partition.
3. The electronic device according to claim 2, wherein The processor is specifically configured as follows: Obtaining a point spread coefficient for each neighborhood backlight partition; the point spread coefficient is used to represent the degree of influence of the light source of the neighborhood backlight partition on the target pixel; the greater the distance between the target pixel and the neighborhood backlight partition, the smaller the point spread coefficient of the neighborhood backlight partition; the target pixel is any pixel in the target backlight partition; Determining a first weight corresponding to each of the neighboring backlight partitions according to the point spread coefficient of each of the neighboring backlight partitions; Based on the first weight of each neighboring backlight partition, a second weight corresponding to the target backlight partition is determined.
4. The electronic device according to claim 3, wherein The point diffusion coefficient includes a plurality of sub-diffusion coefficients; The processor is further configured to: A first weight of the neighborhood backlight partition is determined according to the multiple sub-diffusion coefficients and a preset difference algorithm.
5. The electronic device according to claim 3 or 4, wherein: The processor is specifically configured as follows: For each of the neighboring backlight partitions, determining a point spread coefficient of the neighboring backlight partition based on an index value of the neighboring backlight partition and a preset corresponding relationship; one of the neighboring backlight partitions corresponds to a plurality of index values; The preset corresponding relationship includes a plurality of sub-diffusion coefficients, and one sub-diffusion coefficient corresponds to any two index values among the plurality of index values. The electronic device according to claim 5 , wherein: The processor is further configured to: Determine a binary value corresponding to a coordinate distance from the neighborhood backlight partition to the target pixel point; The preset digit value in the binary value is used as the index value of each of the neighborhood backlight partitions and the target pixel point.
7. The electronic device according to claim 5 or 6, wherein: The processor is further configured to: For each of the neighborhood backlight partitions, the index operation rules of the neighborhood backlight partitions are determined based on the identifier of the neighborhood backlight partitions to obtain the index operation rules of each of the neighborhood backlight partitions; the index operation rules are used to determine the index values of the neighborhood backlight partitions and the target pixel points.
8. The electronic device according to claim 6 or 7, wherein: The coordinate distance includes a longitudinal distance from the neighboring backlight partition to the target pixel and a lateral distance from the neighboring backlight partition to the target pixel; the multiple index values include a first index value, a second index value, a third index value, and a fourth index value; The first index value is: a value of a preset binary digit of the longitudinal distance, or a value of a preset binary digit of the first difference; the first difference is a difference between a partition height of the neighboring backlight partition and the longitudinal distance; The second index value is: the sum of the first index value and a threshold; The third index value is: a binary value of a preset digit of the horizontal distance, or a binary value of a preset digit of the second difference; the second difference is a difference between a partition width of the neighboring backlight partition and the horizontal distance; The fourth index value is: the sum of the third index value and the threshold.
9. The electronic device according to any one of claims 1 to 8, wherein: The processor is further configured to: Determining an equivalent backlight value of the image according to the backlight values and weight values of the plurality of backlight subareas; the equivalent backlight value is a backlight value used to correct the brightness of the image; Based on the equivalent backlight value, a grayscale value of the image is determined.
10. The electronic device according to claim 9, wherein The processor is specifically configured as follows: Obtaining historical grayscale values of multiple channels of the image; The grayscale value of the image is determined based on the historical grayscale values of the multiple channels and the equivalent backlight value.
11. The electronic device according to any one of claims 1 to 10, wherein: A plurality of backlight values are cached in the processor, and the plurality of backlight values include backlight values of the plurality of backlight partitions.
12. The electronic device according to any one of claims 1 to 11, wherein: The sum of the first weights of the plurality of neighboring backlight partitions and the second weight of the target backlight partition is 1.
13. A grayscale compensation method, wherein: The method is applied to an electronic device, which includes: a display screen and a processor; the display screen is used to display an image, and the display screen corresponds to a plurality of backlight partitions, each backlight partition corresponding to an area of the image; The method comprises: Determining a weight value of each backlight partition among the plurality of backlight partitions; the weight value of the backlight partition is used to represent the degree of influence of the light source of the backlight partition on the brightness of the image displayed on the display screen; The grayscale value of the image is determined according to the backlight values and weight values of the multiple backlight subareas.
14. The method according to claim 13, wherein The multiple backlight partitions include a target backlight partition and multiple neighboring backlight partitions of the target backlight partition, and the multiple neighboring backlight partitions are partitions affected by the backlight light source of the target backlight partition; the weight value includes a first weight corresponding to each neighboring backlight partition in the multiple neighboring backlight partitions, and a second weight corresponding to the target backlight partition.
15. The method according to claim 14, wherein The determining a weight value of each backlight partition in the plurality of backlight partitions includes: Obtaining a point spread coefficient for each neighborhood backlight partition; the point spread coefficient is used to represent the degree of influence of the light source of the neighborhood backlight partition on the target pixel; the greater the distance between the target pixel and the neighborhood backlight partition, the smaller the point spread coefficient of the neighborhood backlight partition; the target pixel is any pixel in the target backlight partition; Determining a first weight corresponding to each of the neighboring backlight partitions according to the point spread coefficient of each of the neighboring backlight partitions; Based on the first weight of each neighboring backlight partition, a second weight corresponding to the target backlight partition is determined.
16. The method according to claim 15, wherein The obtaining of the point spread coefficient of each neighborhood backlight partition includes: For each of the neighborhood backlight partitions, the point diffusion coefficient of the neighborhood backlight partition is determined based on the index value of the neighborhood backlight partition and a preset correspondence; one neighborhood backlight partition corresponds to multiple index values; the preset correspondence includes multiple sub-diffusion coefficients, and one sub-diffusion coefficient corresponds to any two index values among the multiple index values.
17. The method according to claim 16, wherein The coordinate distance includes a longitudinal distance from the neighboring backlight partition to the target pixel and a lateral distance from the neighboring backlight partition to the target pixel; the multiple index values include a first index value, a second index value, a third index value, and a fourth index value; The first index value is: a value of a preset binary digit of the longitudinal distance, or a value of a preset binary digit of the first difference; the first difference is a difference between a partition height of the neighboring backlight partition and the longitudinal distance; The second index value is: the sum of the first index value and a threshold; The third index value is: a binary value of a preset digit of the horizontal distance, or a binary value of a preset digit of the second difference; the second difference is a difference between a partition width of the neighboring backlight partition and the horizontal distance; The fourth index value is: the sum of the third index value and the threshold.
18. A grayscale compensation device, wherein: include: A processor and a communication interface; the communication interface is coupled to the processor, and the processor is used to run a computer program or instruction to implement the grayscale compensation method according to any one of claims 13 to 17.
19. A computer-readable storage medium, wherein: The computer-readable storage medium stores instructions. When a computer executes the instructions, the computer executes the grayscale compensation method according to any one of claims 13 to 17.
20. A computer program product, wherein The computer program product includes instructions, and when the instructions are executed on a computer, the computer performs the grayscale compensation method according to any one of claims 13 to 17.