Electronic device, grayscale compensation method, apparatus, and storage medium
By determining the weight values and dot spread coefficients of the backlight zones, and combining lookup tables and convolution calculation modules for grayscale compensation, the problems of low accuracy and poor compatibility of LCD pixel grayscale calculation circuits in local dimming technology are solved, achieving high-precision grayscale compensation and image quality improvement.
Patent Information
- Application Number
- PCT/CN2024/077825
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-02-20
- Publication Date
- 2025-11-13
AI Technical Summary
Existing LCD pixel grayscale calculation circuits suffer from low accuracy and poor compatibility in local dimming technology, especially in achieving compatibility with different backlight zone sizes.
By determining the weight value and point spread coefficient of each backlight zone, and combining a lookup table and a convolution calculation module, high-precision grayscale compensation processing is performed to improve the accuracy and compatibility of image brightness.
High-precision grayscale compensation was achieved, improving image quality and compatibility, and ensuring image display performance under different backlight zone sizes.
Smart Images

Figure CN2024077825_13112025_PF_FP_ABST
Abstract
Description
Electronic devices, grayscale compensation methods, apparatuses and storage media Technical Field
[0001] This disclosure relates to the field of communication technology, and in particular to an electronic device, a grayscale compensation method, an apparatus, and a storage medium. Background Technology
[0002] If local dimming technology is used in an LCD display, the reduction in backlight brightness will usually lead to a decrease in the display brightness of some high grayscale pixels. Therefore, a specific grayscale compensation algorithm is needed to improve the pixel brightness.
[0003] The LCD pixel grayscale calculation circuit is a crucial component of Local Dimming IP (LDIP). Currently, conventional LCD pixel calculation circuits for LDIP typically employ two implementation methods: 1) displaying the original grayscale values of the image directly without any compensation processing; 2) using a low-precision grayscale compensation circuit to perform grayscale calculations. However, both of these conventional solutions generally suffer from low IP accuracy and poor compatibility.
[0004] Summary of the Invention
[0005] On the one hand, an electronic device, a grayscale compensation method, an apparatus, 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, and the display screen has multiple backlight zones, each backlight zone corresponding to a region of the image; the processor is configured to: determine the weight value of each of the multiple backlight zones; the weight value of the backlight zone is used to represent the degree of influence of the light source of the backlight zone 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 value and weight value of the multiple backlight zones.
[0007] In view of this, embodiments of this application provide an electronic device in which a processor can determine the degree of influence of the light source of each of the multiple backlight zones on the brightness of the image displayed on the display screen, i.e., the weight value of each backlight zone, and perform grayscale value correction processing on 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 zones include a target backlight zone and multiple neighboring backlight zones of the target backlight zone, wherein the multiple neighboring backlight zones are zones affected by the backlight source of the target backlight zone; the weight values include a first weight corresponding to each of the multiple neighboring backlight zones and a second weight corresponding to the target backlight zone.
[0009] Based on the above technical solution, each backlight zone in this application embodiment has a degree of influence on image quality, so as to accurately determine the influencing factors affecting image brightness in the future.
[0010] In some embodiments, the processor is specifically configured to: obtain the point spread coefficient of each neighboring backlight partition; 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 from the target pixel to 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; determine the first weight corresponding to each neighboring backlight partition based on the point spread coefficient of each neighboring backlight partition; and determine the second weight corresponding to the target backlight partition based on the first weight of each neighboring backlight partition.
[0011] Based on the above technical solution, the processor in this embodiment can determine the relative positions between different neighborhood backlight partitions and the target pixel. It can be understood that the greater the distance between a neighborhood backlight partition and the target pixel, the less the neighborhood backlight partition is affected by the backlight of the backlight partition where the target pixel is located. Correspondingly, the smaller the dot spread coefficient of the neighborhood backlight partition, the more accurately the processor can determine the degree of influence of the neighborhood backlight partition on the gray level of a certain pixel in the image based on the dot spread coefficient of the neighborhood backlight partition.
[0012] In some embodiments, the point diffusion coefficient includes multiple sub-diffusion coefficients; the processor is further configured to: determine a first weight of the neighborhood backlight partition based on the multiple sub-diffusion coefficients and a preset difference algorithm.
[0013] Based on the above technical solution, since each neighborhood backlight partition in this embodiment includes multiple sub-diffusion coefficients, the processor can accurately determine the weight of each neighborhood backlight partition by performing difference calculations on the multiple sub-diffusion coefficients.
[0014] In some embodiments, the processor is specifically configured to: for each neighboring backlight partition, determine the point diffusion coefficient of the neighboring backlight partition based on the index value of the neighboring backlight partition and a preset correspondence; one neighboring 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 embodiments of this 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 embodiments of this application provide an index value for each neighborhood backlight partition. The point diffusion coefficient of each neighborhood backlight partition is determined by the index value.
[0016] In some embodiments, the processor is further configured to: determine the binary value corresponding to the coordinate distance from the neighboring backlight partition to the target pixel; and use a preset number of bits in the binary value as the index value between each neighboring backlight partition and the target pixel.
[0017] In some embodiments, the processor is further configured to: for each neighboring backlight partition, determine the index operation rule of the neighboring backlight partition based on the identifier of the neighboring backlight partition, so as to obtain the index operation rule of each neighboring backlight partition; the index operation rule is used to determine the index value of the neighboring backlight partition and the target pixel.
[0018] Based on the above technical solution, this application embodiment provides a corresponding index operation rule for each neighboring backlight partition. After the processor converts the coordinate distance from each neighboring backlight partition to the target pixel into binary, it can determine the corresponding index operation rule according to the identifier of each backlight partition. The converted coordinate distance is substituted into the corresponding index operation rule to calculate the index value of each neighboring backlight partition.
[0019] In some embodiments, the coordinate distance includes the vertical distance from the neighboring backlight partition to the target pixel and the horizontal 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 at a preset number of binary digits of the vertical distance, or a value at a preset number of binary digits of the first difference; the first difference is the difference between the partition height of the neighboring backlight partition and the vertical distance; the second index value is: the sum of the first index value and a threshold; the third index value is: a value at a preset number of binary digits of the horizontal distance, or a value at a preset number of binary digits of the second difference; the second difference is the difference between the partition width of the neighboring backlight partition and the horizontal distance; the fourth index value is: the sum of the third index value and a threshold.
[0020] In some embodiments, the processor is further configured to: determine an influence factor of an image based on the backlight values and weight values of a plurality of backlight zones; the influence factor is a factor used to correct the brightness of the image; and determine the grayscale value of the image based on the influence factor.
[0021] In some embodiments, the processor is specifically configured to: acquire historical grayscale values of multiple channels of an image; and determine the grayscale value of the image based on the historical grayscale values of multiple channels and an influencing factor.
[0022] Based on the above technical solution, after accurately determining the influencing factor affecting image brightness, the processor in this embodiment corrects the historical grayscale value through the influencing factor to obtain the corrected image grayscale value, thereby ensuring the display quality of the image.
[0023] In some embodiments, the processor caches multiple backlight values, which include backlight values for multiple backlight zones.
[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, embodiments of this application provide a grayscale compensation method, which is applied to an electronic device, the electronic device including: a display screen and a processor; the display screen is used to display an image, the display screen has multiple backlight partitions, and one backlight partition corresponds to a region of the image; the method includes: determining a weight value for each of 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 zones include a target backlight zone and multiple neighboring backlight zones of the target backlight zone, wherein the multiple neighboring backlight zones are zones affected by the backlight source of the target backlight zone; the weight values include a first weight corresponding to each of the multiple neighboring backlight zones and a second weight corresponding to the target backlight zone.
[0027] In some embodiments, determining the weight value of each backlight partition among a plurality of backlight partitions includes: obtaining the point spread coefficient of each neighboring backlight partition; 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 from the target pixel to 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; determining the first weight corresponding to each of the neighboring backlight partitions based on the point spread coefficient of each neighboring backlight partition; and determining the second weight corresponding to the target backlight partition based on the first weight of each neighboring backlight partition.
[0028] In some embodiments, the point diffusion coefficient includes multiple sub-diffusion coefficients; the method further includes: determining a first weight of the neighborhood backlight partition based on the multiple sub-diffusion coefficients and a preset difference algorithm.
[0029] In some embodiments, obtaining the dot diffusion coefficient of each neighborhood backlight partition includes: for each neighborhood backlight partition, determining the dot 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.
[0030] In some embodiments, the method further includes: determining a binary value corresponding to the coordinate distance from the neighboring backlight partition to the target pixel; and using a preset number of bits in the binary value as the index value between each neighboring backlight partition and the target pixel.
[0031] In some embodiments, the method further includes: for each neighboring backlight partition, determining an index operation rule for the neighboring backlight partition based on the identifier of the neighboring backlight partition, so as to obtain an index operation rule for each neighboring backlight partition; the index operation rule is used to determine the index value between the neighboring backlight partition and the target pixel.
[0032] In some embodiments, the coordinate distance includes the vertical distance from the neighboring backlight partition to the target pixel and the horizontal 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 at a preset number of binary digits of the vertical distance, or a value at a preset number of binary digits of the first difference; the first difference is the difference between the partition height of the neighboring backlight partition and the vertical distance; the second index value is: the sum of the first index value and a threshold; the third index value is: a value at a preset number of binary digits of the horizontal distance, or a value at a preset number of binary digits of the second difference; the second difference is the difference between the partition width of the neighboring backlight partition and the horizontal distance; the fourth index value is: the sum of the third index value and a threshold.
[0033] In some embodiments, determining the grayscale value of an image based on the backlight values and weight values of multiple backlight zones includes: determining an influence factor of the image based on the backlight values and weight values of multiple backlight zones; the influence factor is a factor used to correct the brightness of the image; and determining the grayscale value of the image based on the influence factor.
[0034] In some embodiments, determining the grayscale value of an image based on an influence factor includes: acquiring historical grayscale values of multiple channels of the image; and determining the grayscale value of the image based on the historical grayscale values of multiple channels and the influence factor.
[0035] In another aspect, a grayscale compensation device is provided, including a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run computer programs or instructions 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. The computer-readable storage medium stores computer program instructions that, when executed on a computer (e.g., a receiving node), cause the computer to perform the grayscale compensation method as described in any of the above embodiments.
[0037] In another aspect, a computer program product is provided. 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 grayscale compensation method as described in any of the above embodiments.
[0038] In another aspect, a computer program is provided. When executed on a computer (e.g., a receiving node), the computer program causes the computer to perform the grayscale compensation method as described in any of the above embodiments. Attached Figure Description
[0039] To more clearly illustrate the technical solutions in this disclosure, the accompanying drawings used in some embodiments of this disclosure will be briefly described below. Obviously, the drawings described below are only drawings of some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings. In addition, the drawings described below can be regarded as schematic diagrams and are not intended to limit the actual size of the product, the actual flow of the method, the actual timing of the signals, etc. involved in the embodiments of this disclosure.
[0040] Figure 1 is a structural diagram of an electronic device according to some embodiments;
[0041] Figure 2 is a schematic diagram of multiple backlight zones according to some embodiments;
[0042] Figure 3 is a schematic diagram of a processor according to some embodiments;
[0043] Figure 4 is a schematic diagram of a storage method according to some embodiments;
[0044] Figure 5 is a structural diagram of a lookup table control module according to some embodiments;
[0045] Figure 6 is a structural diagram of a lookup table control module according to some other embodiments;
[0046] Figure 7 is a schematic diagram of a difference calculation circuit according to some embodiments;
[0047] Figure 8 is a schematic diagram of the matrix cache of the backlight matrix control module according to some embodiments;
[0048] Figure 9 is a schematic diagram of matrix initialization cache according to some embodiments;
[0049] Figure 10 is a schematic diagram of the multiplication array of the convolution calculation module according to some embodiments;
[0050] Figure 11 is a schematic diagram of an addition tree array according to some embodiments;
[0051] Figure 12 is a flowchart of a grayscale compensation method according to some embodiments;
[0052] Figure 13 is a schematic diagram of the point diffusion coefficient according to some embodiments;
[0053] Figure 14 is a schematic diagram showing the correspondence between the backlight values and weight values of multiple backlight zones according to some embodiments;
[0054] Figure 15 is a flowchart of a grayscale compensation method according to some other embodiments;
[0055] Figure 16 is a structural diagram of a grayscale compensation device according to some embodiments;
[0056] Figure 17 is a structural diagram of a grayscale compensation device according to some embodiments. Detailed Implementation
[0057] The technical solutions in some embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments provided in this disclosure are within the scope of protection of this disclosure.
[0058] Unless the context otherwise requires, throughout the specification and claims, the term "comprise" and its other forms, such as the third-person singular "comprises" and the present participle "comprising," are interpreted as open-ended and encompassing, meaning "including, but not limited to." In the description of the specification, terms such as "one embodiment," "some embodiments," "exemplary embodiments," "example," "specific example," or "some examples," etc., are intended to indicate that a particular feature, structure, material, or characteristic associated with that embodiment or example is included in at least one embodiment or example of this disclosure. The illustrative representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, a particular feature, structure, material, or characteristic may be included in any suitable manner in any one or more embodiments or examples.
[0059] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of embodiments of this disclosure, unless otherwise stated, "a plurality of" 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", both including the following combinations of A, B and C: only A, only B, only C, combinations of A and B, combinations of A and C, combinations of B and C, and combinations 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, depending on the context, the term “if” may optionally be interpreted as meaning “when”, “in the event of”, “in response to determination”, or “in response to detection”. Similarly, depending on the context, the phrase “if it is determined that…” or “if [the stated condition or event] is detected” may optionally be interpreted as meaning “in the event of determination that…”, “in response to determination that…”, “when [the stated condition or event] is detected”, or “in response to the detection of [the stated condition or event]”.
[0063] The use of “applies to” or “configured to” in this article implies an open and inclusive language that does not preclude applicability to or configuration to devices that perform additional tasks or steps.
[0064] In addition, the use of "based on" implies openness and inclusivity, because processes, steps, calculations or other actions "based on" one or more conditions or values can in practice be based on additional conditions or values beyond those conditions.
[0065] As used herein, “about,” “approximately,” or “approximately” includes the value stated and the average value within an acceptable range of deviation from the given value, wherein the acceptable range of deviation is determined by a person skilled in the art taking into account the measurement under discussion and the error associated with the measurement of the given quantity (i.e., the limitations of the measurement system).
[0066] As used herein, “equal” includes the described situation and situations that are similar to the described situation, within an acceptable range of deviation, which is determined by those skilled in the art taking into account the measurement under discussion and the error associated with the measurement of the particular quantity (i.e., the limitations of the measurement system). “Equal” includes absolute equality and approximate equality, where an acceptable range of deviation for approximate equality may be, for example, a difference between the two equal entities less than or equal to 5% of either one.
[0067] The following explanations of the terms used in the embodiments of this application are provided to facilitate the reader's understanding.
[0068] Liquid Crystal Display (LCD).
[0069] LCD is a type of display used in digital clocks and many portable computers.
[0070] Local dimming (LD) technology.
[0071] This technology adjusts the brightness of a display screen by controlling the brightness of light-emitting diode (LED) backlights. Specifically, this technology can utilize a backlight composed of hundreds or even thousands of LEDs to adjust the brightness according to the brightness of the image displayed on the screen. It can increase the brightness of the bright parts of the displayed image while decreasing the brightness of the dark parts, or even turn them off, thereby achieving the dual effects of saving backlight power consumption and improving contrast.
[0072] Point spread function (PSF).
[0073] The point diffusion coefficient in the embodiments of this application is used to characterize the actual backlight diffusion effect in the backlight area.
[0074] If local dimming technology is used in an LCD display, the reduction in backlight brightness will usually lead to a decrease in the display brightness of some high grayscale pixels. Therefore, a specific grayscale compensation algorithm is needed to improve the pixel brightness.
[0075] The LCD pixel grayscale calculation circuit is a crucial component of the local dimming intellectual property (LD IP). Currently, conventional LCD pixel calculation circuits suitable for LD IP typically employ two implementation methods: 1) directly displaying the original grayscale values of the image without any compensation processing; 2) using a low-precision grayscale compensation circuit to perform grayscale calculations. However, both of these conventional solutions generally suffer from low IP accuracy and poor compatibility.
[0076] Furthermore, conventional LD IPs are difficult to be compatible with different backlight partition sizes in modes with more than 1 lane. This is because the design and implementation of LD IPs may not fully consider the situation where pixels in different data lanes correspond to different backlight partitions in a certain clock cycle. Therefore, specific pixel positioning circuits are required to support accurate positioning for different data lanes.
[0077] In view of this, embodiments of this application provide an electronic device in which a processor can determine the degree of influence of the light source of each of the multiple backlight zones on the brightness of the image displayed on the display screen, i.e., the weight value of each backlight zone, and perform grayscale value correction processing on 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 effect.
[0078] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0079] As shown in Figure 1, Figure 1 is a structural diagram of an electronic device 100 provided in an embodiment of this application. The electronic device 100 can be a terminal device with a display screen, such as a television set. The electronic device 100 may include a display screen 101 and a processor 102.
[0080] In this embodiment of the application, the display screen 101 displays an image, and the display screen 101 corresponds to multiple backlight zones (25 are shown in Figure 2 as an example, but the display screen may include more or fewer backlight zones), and one backlight zone corresponds to one area of the image.
[0081] Local dimming backlighting refers to dividing the backlight of a display screen into multiple zones. Each zone can be independently controlled. This technology improves the picture quality and viewing experience of a television. By dividing the backlight into multiple zones, the brightness of each zone can be better controlled, thereby increasing the contrast and detail of the image. At the same time, local dimming backlighting can also reduce screen washout and improve color accuracy.
[0082] For example, as shown in Figure 2, the backlight zones in the first row can be W00, W01, W02, W03, and W04. The backlight zones in the second row can be W10, W11, W12, W13, and W14. The backlight zones in the third row can be W20, W21, W22, W23, and W24. The backlight zones in the fourth row can be W30, W31, W32, W33, and W34. The backlight zones in the fifth row can be W40, W41, W42, W43, and W44.
[0083] Accordingly, the backlight zones in the first column are W00, W10, W20, W30, and W40. The backlight zones in the second column are W01, W11, W21, W31, and W41. The backlight zones in the third column are W02, W12, W22, W32, and W42. The backlight zones in the fourth column are W03, W13, W23, W33, and W43. The backlight zones in the fifth column are W04, W14, W24, W34, and W44. For example, referring to Figure 2, W22 is the target backlight zone, and W00 to W21 and W23 to W44 are the neighboring backlight zones.
[0084] It is understood that W00 to W44 above are the identifiers of the backlight zones in the embodiments of this application.
[0085] For example, as shown in Figure 3, 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 zone and historical grayscale values for multiple image channels. This configurable register module can employ various storage methods, as shown in Figure 4. Two storage methods are proposed: register storage and static random access memory (SRAM) storage.
[0087] It is understood that the lookup tables (LUT1~LUTN) in this embodiment are two-dimensional lookup tables based on point spread functions. The two dimensions of the two-dimensional lookup tables correspond to the vertical (V) direction and the horizontal (H) direction, respectively. The content of the lookup table for each neighborhood backlight partition includes the point spread function of the backlight source of the target backlight partition diffused to the neighborhood backlight partition at different distances in the vertical and horizontal directions. Since the size of the lookup table (LUT1~LUTN) is determined by the size of the backlight partition that can be supported, the size of the lookup table can be adaptively reduced and adjusted when the size of the backlight partition is larger than the preset size. For example, if a backlight partition has 200 pixels in both the horizontal and vertical 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 lookup table (LUT1~LUTN) interpolation nodes in this application embodiment are illustrated using 8 pixels as an example. This application embodiment does not limit the number of pixels of the interpolation nodes.
[0089] 1-2. The pixel positioning module can be used to provide the position of the pixel point where the corresponding data lane is located in the target backlight partition, the coordinate distance from the neighboring backlight partitions to the target pixel point, and the index value of the neighboring backlight partitions. A backlight partition includes multiple pixels. In this embodiment, the target pixel point can be any pixel point in the target backlight partition.
[0090] In this embodiment of the 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 partition to which all data lanes belong.
[0091] As shown in Table 1 below, with a backlight zone size of 17 pixels and IP 8*lane, the correspondence between different clock cycles (clk), data (lane), and backlight zones is illustrated. This correspondence shows that as time (clk) increases, there is no fixed pattern for the backlight zone to which a specific data lane belongs. Therefore, independent counting control needs to be implemented for the 8 data lanes.
[0092] Table 1
[0093] Another example, as shown in Table 2 below, illustrates another correspondence between different clock speeds (clk), data lanes, and backlight partitions when the backlight partition size is an alternating arrangement of 17 / 18 pixels and IP 8*lane. This correspondence also demonstrates that as clock speed increases over time, there is no fixed pattern to the backlight partition belonging to a specific data lane. Furthermore, the backlight partition specifications and arrangements supported by the circuitry in the pixel positioning module can be preset. It should be noted that multiple backlight partition specifications can be supported in either the horizontal or vertical directions.
[0094] Table 2
[0095] 1-3. The lookup table control module can select rows of the lookup table for different backlight partitions. Specifically, it selects the corresponding row of the lookup table based on the vertical distance in the coordinate distance from the neighboring backlight partition to the target pixel, thus reducing the two-dimensional lookup table to a one-dimensional lookup table. As shown in Figure 5, the dashed box represents the lookup table for a neighboring backlight partition. The rows from lut1-row0 to lut1-rown within the dashed box represent the data from row 0 to row n of the lookup table (LUT1) corresponding to a neighboring backlight partition. The lookup table control module can filter specific rows in the lookup table (LUT1) based on the vertical distance in the coordinate distance from the neighboring backlight partition to the target pixel. This can be achieved by using a multiplexer (MUX) to filter the stored data of a specific row in the lookup table (LUT1), effectively reducing the two-dimensional lookup table to a one-dimensional lookup table.
[0096] The lookup table control module is also used to filter specific columns in a specific row based on the horizontal distance in the coordinate distance from the neighboring backlight partition to the target pixel, 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 filtered row data into registers (LUT1-buffer0-ab) and (LUT1-buffer0-cd), and then determine multiple point spread coefficients of the neighboring backlight partition, such as a, b, c, and d, based on the horizontal distance and the multiplexer.
[0097] It is understandable that in Figure 6, elements -0 to -m in registers (LUT1-buffer0-ab) and (LUT1-buffer0-cd) are column data corresponding to specific rows.
[0098] 1-4. The weight calculation module can calculate the weight value corresponding to each neighborhood backlight partition based on the point diffusion coefficient of each neighborhood backlight partition.
[0099] As exemplarily shown in Figure 7, this embodiment of the application provides a difference calculation circuit for a weight calculation module. The difference calculation circuit includes multiple cut-offs, multiple subtractors, and multiple multipliers. The point spread coefficient of the neighboring backlight partition can be used as the input of the difference calculation circuit, and the output of the difference calculation circuit is the first weight value of the neighboring backlight partition.
[0100] Understandably, the dot spread coefficient of each neighboring backlight zone can be input into this circuit to calculate the weight value. For example, taking neighboring backlight zone W32 as an example, the dot spread coefficients a and c of neighboring backlight zone W32 are input into the first subtractor. The difference is multiplied by mod-v-3 and then input into the first cut-off to obtain the integer value. Then, the dot spread coefficient a and the 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 of the dot spread coefficients a and c.
[0101] Correspondingly, when inputting the point spread coefficients a and c of the neighboring backlight partition W32 into the first subtractor, the point spread coefficients b and d are also input into the third subtractor. The difference is multiplied by mod-v-3 and then input into the second cut-off to obtain an integer value. Finally, the point spread coefficient b and this integer value are input into the fourth subtractor to obtain the intermediate variable f. This intermediate variable f can be understood as the intermediate value of 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. The difference obtained is multiplied by mod-v-2 and then input into the third cutoff to obtain the integer value. Then, the intermediate variable e and the integer value are input into the sixth subtractor. The difference obtained 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 neighborhood backlight partitions of the target backlight partition as the center and cache them in the register bl-reg-buffer.
[0104] For example, as shown in Figure 8, this embodiment of the application provides a matrix cache diagram of a backlight matrix control module. For instance, this embodiment provides 5*6 cache matrices, each storing the backlight value of a corresponding backlight partition. Specifically, bl-reg-00 stores the backlight value of backlight partition W00, and bl-reg-01 stores the backlight value of backlight partition W01. It is understood that this embodiment of the application does not limit the number of cache matrices.
[0105] Since a single clock cycle (clk) may span 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. In other words, the cached backlight values in the backlight matrix control module need to include backlight values from multiple backlight partitions. For example, assuming there are 5*5 backlight partitions, the backlight matrix control module needs to cache 5*6 backlight values. When there is a spanning of partitions, in Figure 8, bl-reg-00 to bl-reg-44 in the first dashed box correspond to the previous backlight partition, while bl-reg-01 to bl-reg-45 in the second dashed box correspond to the next backlight partition. This avoids situations where backlight values cannot be provided in a timely manner due to the presence of partitions spanning two backlight partitions.
[0106] For example, as shown in Figure 9, this embodiment of the application also provides a matrix initialization cache diagram. The data stored in the initialization cache matrix refers to the 5*6 cache matrix in Figure 8, which assigns 5*6 initialization cache data (backlight values) to the 5*6 cache matrix shown in Figure 8 at once when a row of updated image data arrives. The purpose is to ensure that the data refresh time during row switching can be completed in one clock cycle, avoiding excessive delay. Otherwise, it would take 30 clock cycles to complete the initialization of the 5*6 cache matrix.
[0107] Specifically, the backlight matrix control module can work as follows: First, when the image data line of the display screen starts, the 5*6 initialization cache matrix is stored into the corresponding 30 backlight values. Then, 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 the partition is switched in the horizontal direction, the corresponding backlight value is stored sequentially in bl_buffer_reg as shown in Figure 7. Then, when crossing partitions, a column of 1*5 data is assigned to the cache matrix shown in Figure 8 at once.
[0109] When a pixel is transmitted 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 new row of backlight partition 1*5 data is assigned to the 5*6 initialization cache matrix shown in Figure 9 using the row blanking time in the h_blanking area. If yes, the 5*6 initialization cache matrix data is assigned to the 5*6 cache matrix shown in Figure 8.
[0110] The convolution calculation module is used to perform convolution calculations on the backlight values of multiple backlight partitions provided by the backlight matrix control module and the weight values of multiple backlight partitions provided by the weight calculation module to obtain the equivalent backlight value of the image. For example, the equivalent backlight value of the image can be calculated by weighted summing of multiple weight values and backlight values.
[0111] For example, as shown in Figure 10, this application embodiment provides a multiplication array diagram of a convolution calculation module. This application embodiment can perform a weighted summation of the backlight values and weight values of multiple backlight partitions to obtain the equivalent backlight value of the image. For example, the convolution calculation module can multiply the backlight value bl00 of backlight partition W00 with the weight value q00 of backlight partition W00 to obtain the product value bl00byw00 of backlight partition W00. Similarly, the convolution calculation module can also multiply the backlight value bl01 of backlight partition W01 with the weight value q01 of backlight partition W01 to obtain the product value bl01byw01 of backlight partition W01. In this manner, the product values of backlight partitions W00 to W44 are obtained.
[0112] After obtaining the product values of backlight partitions W00 to W44 using the method shown in Figure 10, the convolution calculation module in this embodiment can output sum-psf through the addition tree array shown in Figure 11, that is, add the product values of backlight partitions W00 to W44 to obtain the equivalent backlight value of the image. The addition tree is implemented using a multi-stage pipeline, which can improve the circuit's operating speed.
[0113] The grayscale compensation module is used to compensate the historical grayscale values of the image by using the equivalent backlight value determined by the convolution calculation module, thereby obtaining the image grayscale value.
[0114] In this embodiment, the processor 102 can be a chip. Chips can include five main categories: logic chips, memory chips, sensor chips, power chips, and communication chips. Processors primarily handle specific computational and control tasks within the system, such as MCUs, CPUs, GPUs, and NPUs. Memory chips primarily handle data storage within the system, as well as some memory controller chips 301, such as DRAM, SRAM, and Flash. Sensor chips primarily handle information acquisition, presentation, and interaction within the system, such as input / output devices and some signal processing chips. Communication chips (wired and wireless) primarily handle communication functions within the system, such as Ethernet chips, switching chips, WAN and LAN, point-to-point and ad hoc network chips, and auxiliary communication devices such as filters, amplifiers, and power supplies. Commonly known technologies like WiFi, Bluetooth, 5G baseband, GPS, NB-IoT, network cards, and switches can all be categorized into this group.
[0115] The technical solutions of this application embodiment can be applied to any communication system that supports communication. The communication system can be a 3GPP high-frequency wireless communication system, such as a 4th generation (4G) mobile communication system, such as a long term evolution (LTE) system, an evolved LTE (eLTE) system, a worldwide interoperability for microwave access (WiMAX) communication system, a 5th generation (5G) mobile communication system, such as a new radio (NR) system, a new radio access technology (NR) system, and future communication systems, such as a 6th generation (6G) mobile communication system. It can also be a non-3GPP communication system, and there is no limitation.
[0116] It should be noted that the electronic devices described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, with the evolution of electronic devices and the emergence of other electronic devices, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0117] The methods described in the following embodiments can all be implemented in the electronic device 400 having the above-described hardware structure. The following embodiments use a television set as an example to illustrate the methods of this application.
[0118] The grayscale compensation method provided in the embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0119] The grayscale compensation method of this application embodiment can be applied to grayscale compensation of images displayed on a television. As shown in FIG12, the grayscale compensation method may include S1201-S1202. Among them, S1201 can also be called the "determining different backlight zone weight values" process, and S1202 can be called the "determining grayscale values" process. S1201-S1202 will be described in detail below.
[0120] S1201. Determine the weight value of each backlight partition among multiple backlight partitions.
[0121] In the embodiments related to this application, the multiple backlight zones include a target backlight zone and multiple neighboring backlight zones of the target backlight zone. The multiple neighboring backlight zones are zones affected by the backlight source of the target backlight zone. The weight value of the backlight zone is used to represent the degree of influence of the light source of the backlight zone on the brightness of the image displayed on the display screen. The weight value of the backlight zone may further include: a first weight corresponding to each of the multiple neighboring backlight zones, and a second weight corresponding to the target backlight zone.
[0122] For example, as shown in Figure 2, assuming the target backlight partition is target backlight partition W22, the neighboring backlight partitions include neighboring backlight partitions W00, W01, W02, W03, W04, W10, W11, W12, W13, W14, W20, W21, W23, W24, W30, W31, W32, W33, W34, W40, W41, W42, W43, and W44.
[0123] In this embodiment of the application, the electronic device can obtain the dot diffusion coefficient of each of the aforementioned neighboring backlight partitions, determine the first weight corresponding to each of the neighboring backlight partitions based on the dot diffusion coefficient of each neighboring backlight partition, and then determine the second weight corresponding to the target backlight partition based on the first weight of each neighboring backlight partition.
[0124] The point spread coefficient represents the influence of the neighboring backlight zone light source on the target pixel. The greater the distance from the target pixel to the neighboring backlight zone, the smaller the point spread coefficient of the neighboring backlight zone. The target pixel is any pixel in the target backlight zone. For example, as shown in Figure 2, the target pixel is a pixel in the target backlight zone W22.
[0125] For example, the electronic device described above can obtain the point spread coefficient of each neighborhood backlight partition in either of the following cases (1) and (2).
[0126] Case (1): If the size of the lookup table for each neighborhood backlight partition meets the preset conditions, the electronic device can determine the corresponding point diffusion coefficient by the coordinate distance from each neighborhood backlight partition to the target pixel.
[0127] The lookup table size meeting preset conditions can include: the lookup table size is smaller than a preset size. This preset size is determined based on the size of the backlight partitions or through adjustments made during model training. The setting of this preset size can be performed automatically by the electronic device or manually 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, then the lookup table size corresponding to the backlight partition is 50*50, which is less than the preset size of 100*100. The electronic device can then determine the corresponding point diffusion coefficient based on the coordinate distance of each neighboring backlight partition.
[0129] For example, an electronic device can determine the row of a target pixel based on the horizontal distance Hinner from the neighboring backlight partition W20, and then determine a point diffusion coefficient of the neighboring backlight partition W20 based on the vertical distance Vinner.
[0130] It is worth noting that in the above case (1), the point diffusion coefficient is determined based on the coordinate distance. Since the coordinate distance includes the horizontal distance and the vertical distance, only one point diffusion coefficient can be determined based on the horizontal distance and the vertical distance. Then, the electronic device can find the weight value of the neighborhood backlight partition W20 based on one point diffusion coefficient.
[0131] Case (2): When the size of the lookup table for each neighboring backlight partition of the above electronic device does not meet the preset condition, that is, the size of the lookup table is greater than or equal to the preset size. For each neighboring backlight partition, the electronic device can determine the point diffusion coefficient of the neighboring backlight partition based on the index value of the neighboring backlight partition and the preset correspondence.
[0132] In this context, a neighborhood backlight partition corresponds to multiple index values, and the preset correspondence includes multiple sub-diffusion coefficients, with one sub-diffusion coefficient corresponding to any two of the multiple index values.
[0133] In one scenario, if a neighboring backlight partition W00 has 100 pixels horizontally and 100 pixels vertically, then the lookup table size for this neighboring backlight partition, 100*100, is equal to a preset size of 100*100. The electronic device can determine the dot spread coefficient of the neighboring backlight partition W00 based on multiple index values. The number of index values is equal to the number of dot spread coefficients.
[0134] For example, the neighborhood backlight partition W00 has 4 index values, namely Index_up_0, Index_down_0, Index_left_0, and Index_right_0.
[0135] As shown in Figure 13, the dot 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). Here, LUT1 is the lookup table for the neighborhood backlight partition W00.
[0136] The dot spread coefficient b 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_right_0. For example, b = LUT1(Index_up_0*1+Index_right_0).
[0137] The dot spread coefficient c of the neighborhood backlight partition W00 is determined by the electronic device based on the index value Index_down_0 combined with the index value Index_left_0. For example, c = LUT1(Index_down_0*1+Index_left_0).
[0138] The dot spread coefficient d of the neighborhood backlight partition W00 is determined by the electronic device based on the index value Index_down_0 combined with the index value Index_right_0. For example, d = LUT1(Index_down_0*1+Index_right_0).
[0139] In another scenario, assuming a preset size of 100*100, if the neighboring backlight partition W32 has 200 pixels horizontally and 200 pixels vertically, the lookup table size for this neighboring backlight partition (200*200) is larger than the preset size of 100*100. This means the lookup table contains too many point spread coefficients, leading to longer latency in obtaining the point spread coefficients and excessive data storage. The electronic device can determine the point spread coefficient of the neighboring backlight partition W32 based on multiple index values. The number of index values is equal to the number of point spread coefficients.
[0140] For example, the neighborhood backlight partition W32 has 4 index values, namely Index_up_3, Index_down_3, Index_left_2, and Index_right_2.
[0141] The dot spread coefficient 'a' of the neighborhood 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). Here, LUT6 is the lookup table corresponding to the neighborhood backlight partition W32.
[0142] The dot spread coefficient b of the neighborhood backlight partition W32 is determined by the electronic device based on 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 dot spread coefficient c of the neighborhood backlight partition W32 is determined by the electronic device based on 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 dot spread coefficient d of the neighborhood backlight zone W32 is determined by the electronic device based on 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 example, the neighborhood backlight partition W21 has four index values: Index_up_2, Index_down_2, Index_left_1, and Index_right_1.
[0146] The dot spread coefficient 'a' of the neighborhood 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). Here, LUT5 is the lookup table corresponding to the neighborhood backlight partition W21. The dot spread coefficient 'b' of the neighborhood 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 dot spread coefficient c of the neighborhood backlight partition W21 is determined by the electronic device based on 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 dot spread coefficient d of the neighborhood backlight partition W21 is determined by the electronic device based on 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 is understood that in this embodiment, one neighboring backlight partition corresponds to one lookup table. For example, the lookup tables (LUT1~LUTN) in this embodiment are based on a 6*6 structure, as shown in Figure 2. The lookup table corresponding to neighboring backlight partitions W00, W04, W40, and W44 is LUT1. The lookup table corresponding to neighboring backlight partitions W10, W14, W30, and W34 is LUT2. The lookup table corresponding to neighboring backlight partitions W20 and W24 is LUT3. The lookup table corresponding to neighboring backlight partitions W11, W13, W31, and W33 is LUT4. The lookup table corresponding to neighboring backlight partitions W21 and 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 dividing the width of the backlight partition by the interpolation node distance, and the embodiments of this application do 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). Consequently, the weights of the corresponding neighborhood backlight partitions obtained based on the point spread coefficients of each neighborhood backlight partition in case (2) are more accurate. For example, the electronic device will obtain the point spread coefficients of 24 neighborhood backlight partitions, W00~W21 and W23~W44.
[0152] The following is an overview of 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 this embodiment of the application, the electronic device can determine the first weight of the neighborhood backlight partition based on 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 Figure 13, the electronic device can substitute the dot diffusion coefficients a and 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 dot diffusion coefficients a and b. For example, e = a - int([(ac)*mod_v_3] / 8 + 0.5). Where mod_v_3 is the modulo operation in the vertical direction.
[0155] Simultaneously, the electronic device substitutes the point diffusion coefficients c and d into the difference calculation formula in the preset difference algorithm to calculate the intermediate variable f between the point diffusion coefficients c and d. For example, e = b - int([(bd)*mod_v_3] / 8 + 0.5).
[0156] After obtaining intermediate variables e and f, the first weight of the neighborhood backlight partition W32 of the aforementioned electronic device satisfies the following formula 1: W32 权重 = e - int([(ef)*mod_h_2] / 8+0.5). Where mod_h_2 is the modulo operation in the horizontal direction.
[0157] Another example, taking the aforementioned neighborhood backlight zone W21 as an example. The electronic device can substitute the dot diffusion coefficients a and b of the neighborhood backlight zone W21 into the difference calculation formula in the preset difference algorithm to calculate the intermediate variable e between the dot diffusion coefficients a and b. For example, e = a - int([(ac)*mod_v_2] / 8 + 0.5). Where mod_v_2 is the modulo operation in the vertical direction.
[0158] Simultaneously, the electronic device substitutes the point diffusion coefficients c and d into the difference calculation formula in the preset difference algorithm to calculate the intermediate variable f between the point diffusion coefficients c and d. For example, e = b - int([(bd)*mod_v_2] / 8 + 0.5).
[0159] After obtaining intermediate variables e and f, the first weight of the neighborhood backlight partition W32 of the aforementioned electronic device 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 embodiments of this application provide a modulo operation rule for weights as shown in Table 3 below.
[0161] Table 3
[0162] In Table 2, % represents the remainder symbol in binary; >> represents the right shift of binary data by 1 bit; and << represents the left shift of binary data by 1 bit.
[0163] In this embodiment of the application, each neighborhood backlight partition can determine its corresponding weight according to the above-mentioned modulo operation rules and the preset difference algorithm. For example, as shown in Figure 2, the electronic device can obtain the first weight values of 24 neighborhood backlight partitions, W00~W21 and W23~W44.
[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 understood that, in the embodiments of this 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 based on the backlight values and weight values of multiple backlight zones.
[0167] Among them, the grayscale value of an 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 zones, and determine the display grayscale value of the target pixel of the image based on the equivalent backlight value and the historical grayscale value of the target pixel of the image.
[0169] The equivalent backlight value is the backlight value used to correct the brightness of the target pixel in the image.
[0170] In this embodiment, the electronic device can perform a weighted summation of the backlight values and weight values of multiple backlight zones 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 based on the equivalent backlight value to determine the display grayscale value of the target pixel of the image.
[0171] For example, each backlight zone has a corresponding backlight value and weight value. For instance, as shown in Figure 14, BL00 in backlight zone W00 is the backlight value of that backlight zone, and W00 is the weight value of that backlight zone; or, BL11 in backlight zone W11 is the backlight value of that backlight zone, and W11 is the weight value of that backlight zone.
[0172] For example, the electronic device substitutes the backlight values of backlight zones W00 to W44 and their corresponding weight values into the following formula 2 to calculate the 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 each backlight zone of the electronic device can be either 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 more rows of LCD image pixel values in order to reference the current frame's backlight value.
[0174] In this embodiment of the application, the electronic device can also acquire the historical grayscale values of multiple channels of the image, and determine the grayscale value of the image based on the historical grayscale values of 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) based on 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] Where Rcom, Gcom, and Bcom are the grayscale values after compensation for multiple channels of the image.
[0177] It should be noted that the specific calculation methods of each parameter involved in S1202 have been explained in detail above. The above description is for the purpose of more clearly explaining the grayscale compensation method described in the embodiments of this application, and should not be construed as a limitation on the specific implementation of this application.
[0178] Based on the technical solution in Figure 12, the grayscale compensation method provided in this application embodiment allows the electronic device to determine the degree of influence of the light source of each backlight zone on the brightness of the image displayed on the screen, i.e., the weight value of each backlight zone, and to correct the grayscale value of the image displayed on the 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 zone has 200 pixels horizontally and 200 pixels vertically, the lookup table size for that backlight zone will be too large, resulting in an excessive number of point spread coefficients in the lookup table. Therefore, this embodiment of the application can reduce the number of point spread coefficients by inserting index values.
[0180] In this embodiment of the application, the electronic device can determine the index value of each neighboring backlight partition. As shown in FIG15, it may include the following S1501 and S1502.
[0181] S1501. Determine the binary value corresponding to the coordinate distance from the neighboring backlight partition to the target pixel.
[0182] The coordinate distance includes the vertical distance from the neighboring backlight partition to the target pixel and the horizontal distance from the neighboring backlight partition to the target pixel.
[0183] In this embodiment, the electronic device can convert both the vertical and horizontal distances from each neighboring backlight partition to the target pixel into binary values. For example, referring to Figure 2 above, if neighboring backlight partitions W00, W01, W02, W03, and W04 are in the same row, then the vertical distances from each of these partitions to the target pixel are equal. The electronic device can convert only the vertical distance of one of these neighboring backlight partitions into a binary value.
[0184] Similarly, if neighboring backlight partitions W00, W10, W20, W30, and W40 are in the same column, then the lateral distances from these partitions to the target pixel are equal. The electronic device can convert the lateral distance of just one of these neighboring backlight partitions into a binary value.
[0185] For example, as shown in Figure 2 above, the electronic device can convert the vertical distance 6 from the neighboring backlight partition W00 to the target pixel into the binary value 0110, and the horizontal distance 16 from the neighboring backlight partition W00 to the target pixel into the binary value 00010000.
[0186] Since the vertical distances from neighboring backlight partitions W00, W01, W02, W03, and W04 to the target pixel are equal, the electronic device only needs to convert the horizontal distance 5 of neighboring backlight partition W01 to the binary value 0101 when converting the coordinate distance of neighboring backlight partition W01. Similarly, when converting the coordinate distances of neighboring backlight partitions W02, W03, and W04, only the horizontal distance needs to be converted.
[0187] S1502, Use the preset bit value in the binary value as the index value of each neighboring backlight partition and the target pixel.
[0188] Among them, 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 either the value at a preset number of bits in the binary representation of the vertical distance, or the value at a preset number of bits in the binary representation of the first difference; the first difference is the difference between the partition height of the neighboring backlight partition and the vertical distance. The second index value is the sum of the first index value and a threshold.
[0190] The third index value is either the value at a preset number of bits in the binary representation of the horizontal distance, or the value at a preset number of bits in the binary representation of the second difference, where the second difference is the difference between the 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.
[0191] In this embodiment, the electronic device determines the index operation rule for each neighboring backlight partition based on the identifier of the neighboring backlight partition, so as to obtain the index operation rule for each neighboring backlight partition; the index operation rule is used to determine the index value between the neighboring backlight partition and the target pixel.
[0192] It is understandable that the number of point diffusion coefficients in a neighborhood backlight partition is equal to the number of index values in that neighborhood backlight partition.
[0193] For example, the present application provides a vertical indexing operation rule as shown in Table 4 below.
[0194] Table 4
[0195] In the above, in the vertical indexing operation rules, Vinner is the vertical distance from the neighboring backlight partition to the target pixel; BV is the partition height of the neighboring backlight partition; and >> is the binary data right shift 1 bit operator.
[0196] For example, the present application provides a horizontal indexing operation rule as shown in Table 5 below.
[0197] Table 5
[0198] In the above-mentioned horizontal indexing operation rules, Hinner is the horizontal distance from the neighboring backlight partition to the target pixel; HV is the partition width of the neighboring backlight partition.
[0199] It is understood that since an interpolation node is set for every 8 pixels in this embodiment, c is 3 in the above example.
[0200] For example, as shown in Figure 2, the first 0 in the neighborhood backlight partition W00 represents the index value identifier in the vertical direction, and the second 0 in the neighborhood backlight partition W00 represents the index value identifier in the horizontal direction. Based on the index operation rules provided in the above embodiments of this application, the operation rule for the index value of the neighborhood backlight partition W00 in the vertical direction is as follows:
[0201] Index_up_0=Vinner>>c, and Index_down_0=Index_up_0+1.
[0202] The calculation rule for the horizontal index value of the neighboring backlight partition W00 is as follows:
[0203] Index_left_0=Hinner>>c, and Index_right_0=Index_left_0+1.
[0204] For example, as shown in Figure 2, 0 in the neighborhood backlight partition W01 represents the index value identifier in the vertical direction, and 1 in the neighborhood backlight partition W01 represents the index value identifier in the horizontal direction. Based on the index operation rules provided in the above embodiments of this application, the operation rule for the index value of the neighborhood backlight partition W01 in the vertical direction is as follows:
[0205] Index_up_0=Vinner>>c, and Index_down_0=Index_up_0+1.
[0206] The calculation rule for the horizontal index value of the neighboring backlight partition W01 is as follows:
[0207] Index_left_1=Hinner>>c, and Index_right_1=Index_left_1+1.
[0208] For example, as shown in Figure 2, 0 in the neighborhood backlight partition W02 represents the index value identifier in the vertical direction, and 2 in the neighborhood backlight partition W02 represents the index value identifier in the horizontal direction. Based on the index operation rules provided in the above embodiments of this application, the operation rule for the index value of the neighborhood backlight partition W02 in the vertical direction is as follows:
[0209] Index_up_0=Vinner>>c, and Index_down_0=Index_up_0+1.
[0210] The calculation rule for the index value of the neighboring backlight partition W02 in the horizontal direction requires determining whether the horizontal distance from the neighboring backlight partition W02 to the target pixel 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 is less than the partition width of the neighboring backlight partition W02, the operation rule for 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 is greater than or equal to the partition width of the neighboring backlight partition W02, the operation rule for 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 example, as shown in Figure 2, 0 in the neighborhood backlight partition W03 represents the index value identifier in the vertical direction, and 3 in the neighborhood backlight partition W03 represents the index value identifier in the horizontal direction. Based on the index operation rules provided in the above embodiments of this application, the operation rule for the index value of the neighborhood backlight partition W03 in the vertical direction is as follows:
[0214] Index_up_0=Vinner>>c, and Index_down_0=Index_up_0+1.
[0215] The calculation rule for the horizontal index value of the neighboring backlight partition W03 is as follows:
[0216] Index_left_3=(HV-Hinner)>>c, and Index_right_3=Index_left_3+1.
[0217] For example, as shown in Figure 2, the 2 in the neighboring backlight partition W21 represents the index value identifier in the vertical direction, and the 1 in the neighboring backlight partition W21 represents the index value identifier in the horizontal direction. Based on the indexing operation rules provided in the embodiments of this application, the operation rule for the index value of the neighboring backlight partition W21 in the vertical direction requires determining whether the vertical distance from the neighboring backlight partition W21 to the target pixel is less than the partition height of the neighboring backlight partition W21.
[0218] When the vertical distance from the neighboring backlight partition W21 to the target pixel is less than the partition height of the neighboring backlight partition W21, the operation rule for the index value of the neighboring backlight partition W21 in the vertical direction is: Vinner<(BV>>1):Index_up_2=((BV>>1)-Vinner)>>c; Index_down_2=Index_up_2+1.
[0219] When the vertical distance from the neighboring backlight partition W21 to the target pixel is greater than or equal to the partition height of the neighboring backlight partition W21, the calculation rule for the index value of the neighboring backlight partition W21 in the vertical direction is: Vinner≥(BV>>1):Index_up_2=(Vinner-(BV>>1))>>c; Index_down_2=Index_up_2+1.
[0220] The calculation rule for the horizontal index value of the neighboring backlight partition W21 is as follows:
[0221] Index_left_1=Hinner>>c, and Index_right_1=Index_left_1+1.
[0222] For example, as shown in Figure 2, the 3 in the neighborhood backlight partition W32 represents the index value identifier in the vertical direction, and the 2 in the neighborhood backlight partition W32 represents the index value identifier in the horizontal direction. Based on the index operation rules provided in the above embodiments of this application, the operation rule for the index value of the neighborhood backlight partition W32 in the vertical direction is as follows:
[0223] Index_up_3=(BV-Vinner)>>c, and Index_down_3=Index_up_3+1.
[0224] The calculation rule for the index value of the neighboring backlight partition W32 in the horizontal direction requires determining whether the horizontal distance from the neighboring backlight partition W32 to the target pixel 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 is less than the partition width of the neighboring backlight partition W32, the operation rule for 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 is greater than or equal to the partition width of the neighboring backlight partition W32, the operation rule for 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 this application provides a corresponding index operation rule for each neighboring backlight partition. After the processor converts the coordinate distance from each neighboring backlight partition to the target pixel into binary, it can determine the corresponding index operation rule according to the identifier of each backlight partition. The converted coordinate distance is substituted into the corresponding index operation rule to calculate the index value of each neighboring backlight partition. This can improve the efficiency of subsequent determination of the point diffusion coefficient, reduce latency, and reduce data storage memory.
[0228] It should be noted that the various embodiments of this application can be referenced or learned from each other. For example, the same or similar steps, method embodiments, system embodiments and device embodiments can be referenced from each other without limitation.
[0229] This application embodiment can divide the grayscale compensation device into functional modules or functional units according to the above method example. For example, each function can be divided into a separate functional module or functional unit, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or in software functional modules or functional units. The module or unit division in this application embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.
[0230] Figure 16 shows a schematic diagram of a grayscale compensation device provided in an embodiment of this application. The device is applied to an electronic device, which includes a display screen and a processor. The display screen is used to display images and has multiple backlight zones, with each backlight zone corresponding to a region of the image. The device includes a processing unit 1601 and a communication unit 1602.
[0231] The processing unit 1601 is configured to determine the weight value of each of the multiple backlight zones; the weight value of the backlight zone is used to represent the degree of influence of the light source of the backlight zone on the brightness of the image displayed on the display screen; the processing unit 1601 is also configured to determine the grayscale value of the image based on the backlight value and weight value of the multiple backlight zones.
[0232] In one possible implementation, the multiple backlight zones include a target backlight zone and multiple neighboring backlight zones of the target backlight zone, wherein the multiple neighboring backlight zones are zones affected by the backlight source of the target backlight zone; the weight values include a first weight corresponding to each of the multiple neighboring backlight zones and a second weight corresponding to the target backlight zone.
[0233] In one possible implementation, the communication unit 1602 is configured to acquire the point spread coefficient of each neighboring backlight partition; 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 from the target pixel to 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; the processing unit 1601 is further configured to determine the corresponding first weight of each neighboring backlight partition based on the point spread coefficient of each neighboring backlight partition; the processing unit 1601 is further configured to determine the corresponding second weight of the target backlight partition based on the first weight of each neighboring backlight partition.
[0234] In one possible implementation, the point diffusion coefficient includes multiple sub-diffusion coefficients; the processing unit 1601 is specifically configured to determine the first weight of the neighborhood backlight partition based on the multiple sub-diffusion coefficients and a preset difference algorithm.
[0235] In one possible implementation, the processing unit 1601 is specifically configured to determine the point diffusion coefficient of each neighboring backlight partition based on the index value of the neighboring backlight partition and a preset correspondence; one neighboring 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 the binary value corresponding to the coordinate distance from the neighboring backlight partition to the target pixel; and use the preset bit value in the binary value as the index value between each neighboring backlight partition and the target pixel.
[0237] In one possible implementation, the processing unit 1601 is further configured to determine the index operation rule of each neighboring backlight partition based on the identifier of the neighboring backlight partition, so as to obtain the index operation rule of each neighboring backlight partition; the index operation rule is used to determine the index value of the neighboring backlight partition and the target pixel.
[0238] In one possible implementation, the coordinate distance includes the vertical distance from the neighboring backlight partition to the target pixel and the horizontal distance from the neighboring backlight partition to the target pixel; 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 at a preset number of binary digits of the vertical distance, or a value at a preset number of binary digits of the first difference; the first difference is the difference between the partition height of the neighboring backlight partition and the vertical distance; the second index value is: the sum of the first index value and a threshold; the third index value is: a value at a preset number of binary digits of the horizontal distance, or a value at a preset number of binary digits of the second difference; the second difference is the difference between the partition width of the neighboring backlight partition and the horizontal distance; the fourth index value is: the sum of the third index value and a threshold.
[0239] In one possible implementation, the processing unit 1601 is further configured to determine the equivalent backlight value of the image based on the backlight values and weight values of multiple backlight zones; the equivalent backlight value is a backlight value used to correct the image brightness; and the grayscale value of the image is determined based on the equivalent backlight value.
[0240] In one possible implementation, the processing unit 1601 is specifically configured to acquire historical grayscale values of multiple channels of an image; and determine the grayscale value of the image based on the historical grayscale values of multiple channels and the equivalent backlight value.
[0241] In one possible implementation, the processor caches multiple backlight values, which include backlight values for multiple backlight partitions.
[0242] In one possible implementation, the sum of the first weights of multiple neighboring backlight partitions and the second weight of the target backlight partition is 1.
[0243] When implemented in hardware, the communication unit 1602 in this embodiment can be integrated on the communication interface, and the processing unit 1601 can be integrated on the processor. A specific implementation is shown in Figure 17.
[0244] Figure 17 illustrates another possible structural diagram of the grayscale compensation device involved in the above embodiments. The communication device includes a processor 1702 and a communication interface 1703. The 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. The 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; the memory 1701 is used to store the device's program code and data.
[0245] The memory 1701 may be a memory in the device, and the memory may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, hard disk or solid-state drive; the memory may also include a combination of the above types of memory.
[0246] The processor 1702 described above can implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor can be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
[0247] Bus 1704 can be an Extended Industry Standard Architecture (EISA) bus, etc. Bus 1704 can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in Figure 17, but this does not mean that there is only one bus or one type of bus.
[0248] The device in Figure 17 can also be a chip. The chip includes one or more processors 1702 and a communication interface 1703.
[0249] Optionally, the chip also includes a memory 1705, which may include read-only memory and random access memory, and provides operation instructions and data to the processor 1702. A portion of the memory 1705 may also include non-volatile random access memory (NVRAM).
[0250] In some implementations, memory 1705 stores elements such as execution modules or data structures, or subsets thereof, or extended sets thereof.
[0251] In this embodiment of the application, the corresponding operation is executed by calling the operation instructions stored in the memory 1705 (the operation instructions can be stored in the operating system).
[0252] Some embodiments of this disclosure provide a computer-readable storage medium (e.g., a non-transitory computer-readable storage medium) storing computer program instructions that, when executed on a computer (e.g., a receiving node), cause the computer to perform a synchronization method as described in any of the above embodiments.
[0253] For example, the aforementioned computer-readable storage media may include, but are not limited to: magnetic storage devices (e.g., hard disks, floppy disks, or magnetic tapes), optical discs (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 this 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 this disclosure also 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 as described in the above embodiments.
[0255] Some embodiments of this disclosure also provide a computer program. When executed on a computer (e.g., a receiving node), the computer program causes the computer to perform the synchronization method as described in the above embodiments.
[0256] The beneficial effects of the computer-readable storage medium, computer program product, and computer program described above are the same as the beneficial effects of the synchronization methods in some of the above 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 illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0258] The units described as separate components may or may not be physically separate. The 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 the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0259] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0260] The above are merely specific embodiments of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any variations or substitutions conceived by those skilled in the art within the scope of the technology disclosed in this disclosure should be included within the scope of protection of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the scope 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 images, and the display screen has multiple backlight zones, with each backlight zone corresponding to a region of the image; The processor is configured to: determine a weight value for each of the plurality of backlight zones; the weight value of the backlight zone is used to represent the degree of influence of the light source of the backlight zone 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 value and weight value of the plurality of backlight zones.
2. The electronic device according to claim 1, wherein, The plurality of backlight zones include a target backlight zone and a plurality of neighboring backlight zones of the target backlight zone, wherein the plurality of neighboring backlight zones are zones affected by the backlight source of the target backlight zone; the weight value includes a first weight corresponding to each of the plurality of neighboring backlight zones and a second weight corresponding to the target backlight zone.
3. The electronic device according to claim 2, wherein, The processor is specifically configured as follows: Obtain the point spread coefficient of each neighboring backlight partition; 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 from the target pixel to 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; Based on the point spread coefficient of each neighborhood backlight partition, determine the corresponding first weight for each; Based on the first weight of each neighboring backlight partition, the second weight corresponding to the target backlight partition is determined.
4. The electronic device according to claim 3, wherein, The point diffusion coefficient includes multiple sub-diffusion coefficients; The processor is further configured to: The first weight of the neighborhood backlight partition is determined based on the multiple sub-diffusion coefficients and the preset difference algorithm.
5. The electronic device according to claim 3 or 4, wherein, The processor is specifically configured as follows: For each neighborhood backlight partition, 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.
6. The electronic device according to claim 5, wherein, The processor is further configured to: Determine the binary value corresponding to the coordinate distance from the neighboring backlight partition to the target pixel; The preset digit value in the binary value is used as the index value of each neighborhood backlight partition and the target pixel.
7. The electronic device according to claim 5 or 6, wherein, The processor is further configured to: For each neighboring backlight partition, an indexing operation rule is determined based on the identifier of the neighboring backlight partition to obtain the indexing operation rule for each neighboring backlight partition; the indexing operation rule is used to determine the index value between the neighboring backlight partition and the target pixel.
8. The electronic device according to claim 6 or 7, wherein, The coordinate distance includes the vertical distance from the neighboring backlight partition to the target pixel and the horizontal distance from the neighboring backlight partition to the target pixel; the plurality of index values includes a first index value, a second index value, a third index value, and a fourth index value; The first index value is: the value of a predetermined number of bits in the binary representation of the vertical distance, or the value of a predetermined number of bits in the binary representation of the first difference; the first difference is the difference between the partition height of the neighboring backlight partition and the vertical distance. The second index value is the sum of the first index value and the threshold. The third index value is: the value of a preset number of bits in the binary representation of the horizontal distance, or the value of a preset number of bits in the binary representation of the second difference; the second difference is the difference between the 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-8, wherein, The processor is further configured to: The equivalent backlight value of the image is determined based on the backlight values and weight values of the multiple backlight zones; the equivalent backlight value is a backlight value used to correct the brightness of the image. The grayscale value of the image is determined based on the equivalent backlight value.
10. The electronic device according to claim 9, wherein, The processor is specifically configured as follows: Obtain the 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-10, wherein, The processor caches multiple backlight values, which include the backlight values of the multiple backlight zones.
12. The electronic device according to any one of claims 1-11, wherein, The sum of the first weight 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 images and has multiple backlight zones, with each backlight zone corresponding to a region of the image. The method includes: Determine the weight value of each of the plurality of backlight zones; the weight value of the backlight zone is used to represent the degree of influence of the light source of the backlight zone on the brightness of the image displayed on the display screen; The grayscale value of the image is determined based on the backlight value and weight value of the multiple backlight zones.
14. The method according to claim 13, wherein, The plurality of backlight zones include a target backlight zone and a plurality of neighboring backlight zones of the target backlight zone, wherein the plurality of neighboring backlight zones are zones affected by the backlight source of the target backlight zone; the weight value includes a first weight corresponding to each of the plurality of neighboring backlight zones and a second weight corresponding to the target backlight zone.
15. The method according to claim 14, wherein, Determining the weight value of each of the plurality of backlight zones includes: Obtain the point spread coefficient of each neighboring backlight partition; 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 from the target pixel to 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; Based on the point spread coefficient of each neighborhood backlight partition, determine the corresponding first weight for each partition. Based on the first weight of each neighboring backlight partition, the second weight corresponding to the target backlight partition is determined.
16. The method according to claim 15, wherein, The process of obtaining the dot spread coefficient of each neighboring backlight partition includes: For each neighborhood backlight partition, 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 the vertical distance from the neighboring backlight partition to the target pixel and the horizontal distance from the neighboring backlight partition to the target pixel; the plurality of index values includes a first index value, a second index value, a third index value, and a fourth index value; The first index value is: the value of a predetermined number of bits in the binary representation of the vertical distance, or the value of a predetermined number of bits in the binary representation of the first difference; the first difference is the difference between the partition height of the neighboring backlight partition and the vertical distance. The second index value is the sum of the first index value and the threshold. The third index value is: the value of a preset number of bits in the binary representation of the horizontal distance, or the value of a preset number of bits in the binary representation of the second difference; the second difference is the difference between the 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, the processor being used to run computer programs or instructions to implement the grayscale compensation method as described in any one of claims 13-17.
19. A computer-readable storage medium, wherein, The computer-readable storage medium stores instructions, and when the computer executes the instructions, the computer performs the grayscale compensation method according to any one of claims 13-17.
20. A computer program product, wherein, The computer program product includes instructions that, when executed on a computer, enable the computer to perform the grayscale compensation method as described in any one of claims 13-17.