Gamma curve generation method, contrast adjustment method, device, equipment and medium
Patent Information
- Application Number
- CN202310149092.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-22
- Publication Date
- 2026-10-16
- Estimated Expiration
- 2043-02-22
AI Technical Summary
[0004]本发明提供了一种伽马曲线生成方法、对比度调整方法、装置、设备和介质,以解决在环境光照环境下显示屏调整对比度不佳,造成显示屏可读性差的问题
[0028] This invention, after acquiring the first display brightness of the display screen when a white field signal is input and the reflected brightness of the display screen under a target ambient brightness environment, obtains a second gamma curve by superimposing the reflected brightness on a preset first gamma curve. A third gamma curve is then generated based on the first display brightness, reflected brightness, second gamma curve, and a preset target contrast ratio. This third gamma curve serves as the gamma curve for adjusting the contrast ratio of the display screen to the target contrast ratio under the target ambient brightness environment. Since the second gamma curve is generated by superimposing the reflected brightness on the default first gamma curve, and the gamma curve for adjusting the contrast ratio of the display screen to the target contrast ratio under the target ambient brightness environment is generated based on the first display brightness, reflected brightness, and second gamma curve, this invention achieves the goal of adjusting the contrast ratio of the display screen to a target contrast ratio suitable for comfortable viewing by calling the gamma curve corresponding to the target ambient brightness under different target ambient brightness environments. This solves the problem of poor contrast ratio and poor readability of the display screen under ambient light caused by calculating the contrast ratio only based on the maximum and minimum brightness in a dark room environment. The invention can constantly adjust the display screen to a target contrast ratio suitable for comfortable viewing by the human eye based on the ambient brightness, improving the readability of the display screen under different brightness environments.
Smart Images

Figure CN118538180B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of display technology, and in particular to a method for generating gamma curves, a method for adjusting contrast, an apparatus, a device, and a medium. Background Technology
[0002] As electronic displays become a part of people's lives, screen readability (contrast ratio) is crucial for eye protection due to the need to safeguard the eyes.
[0003] Current displays maintain a relatively comfortable viewing level for the human eye in dark environments. However, in the presence of ambient light (such as sunlight), the display appears as a washed-out white, requiring the human eye to exert considerable effort to see the information on the screen. This is because existing technology calculates the ratio of the maximum brightness (pure white screen) and minimum brightness (pure black screen) of the display in a dark environment as the contrast ratio. Summary of the Invention
[0004] This invention provides a gamma curve generation method, a contrast adjustment method, an apparatus, a device, and a medium to solve the problem of poor contrast adjustment of the display screen under ambient lighting conditions, resulting in poor readability of the display screen.
[0005] In a first aspect, the present invention provides a method for generating gamma curves, comprising:
[0006] The display screen's first display brightness is obtained when a white field signal is input, and the reflected brightness of the display screen is obtained under the target ambient brightness.
[0007] The second gamma curve is obtained by superimposing the reflected brightness onto the preset first gamma curve;
[0008] A third gamma curve is generated based on the first display brightness, the reflected brightness, the second gamma curve, and the preset target contrast ratio, so as to serve as the gamma curve for adjusting the contrast ratio of the display screen to the target contrast ratio when the display screen is in an environment with the target ambient brightness.
[0009] Secondly, the present invention provides a contrast adjustment method, comprising:
[0010] Detect the target ambient brightness of the environment in which the display screen is located;
[0011] Obtain the target gamma curve corresponding to the target ambient brightness;
[0012] The contrast of the display screen is adjusted to the target contrast based on the target gamma curve;
[0013] The gamma curve corresponding to the target ambient brightness is generated according to the gamma curve generation method described in the first aspect.
[0014] Thirdly, the present invention provides a gamma curve generation apparatus, comprising:
[0015] The brightness acquisition module is used to acquire the first display brightness of the display screen when a white field signal is input, and to acquire the reflected brightness of the display screen under the target ambient brightness.
[0016] Gamma curve generation module one is used to superimpose the reflected brightness onto a preset first gamma curve to obtain a second gamma curve;
[0017] The second gamma curve generation module is used to generate a third gamma curve based on the first display brightness, the reflected brightness, the second gamma curve, and the preset target contrast ratio, so as to serve as the gamma curve for adjusting the contrast ratio of the display screen to the target contrast ratio when the display screen is in the environment of the target ambient brightness.
[0018] Fourthly, the present invention provides a contrast adjustment device, comprising:
[0019] The target environment brightness detection module is used to detect the target environment brightness of the environment in which the display screen is located;
[0020] The target gamma curve calling module is used to obtain the target gamma curve corresponding to the target ambient brightness;
[0021] A contrast adjustment module is used to adjust the contrast of the display screen to the target contrast according to the target gamma curve;
[0022] The gamma curve corresponding to the target ambient brightness is generated according to the gamma curve generation method described in the first aspect.
[0023] Fifthly, the present invention provides an electronic device, the electronic device comprising:
[0024] At least one processor; and
[0025] A memory communicatively connected to the at least one processor; wherein,
[0026] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the gamma curve generation method according to the first aspect of the present invention, and / or the contrast adjustment method according to the second aspect.
[0027] In a sixth aspect, the present invention provides a computer-readable storage medium storing computer instructions that, when executed by a processor, implement the gamma curve generation method of the first aspect of the present invention and / or the contrast adjustment method of the second aspect.
[0028] This invention, after acquiring the first display brightness of the display screen when a white field signal is input and the reflected brightness of the display screen under a target ambient brightness environment, obtains a second gamma curve by superimposing the reflected brightness on a preset first gamma curve. A third gamma curve is then generated based on the first display brightness, reflected brightness, second gamma curve, and a preset target contrast ratio. This third gamma curve serves as the gamma curve for adjusting the contrast ratio of the display screen to the target contrast ratio under the target ambient brightness environment. Since the second gamma curve is generated by superimposing the reflected brightness on the default first gamma curve, and the gamma curve for adjusting the contrast ratio of the display screen to the target contrast ratio under the target ambient brightness environment is generated based on the first display brightness, reflected brightness, and second gamma curve, this invention achieves the goal of adjusting the contrast ratio of the display screen to a target contrast ratio suitable for comfortable viewing by calling the gamma curve corresponding to the target ambient brightness under different target ambient brightness environments. This solves the problem of poor contrast ratio and poor readability of the display screen under ambient light caused by calculating the contrast ratio only based on the maximum and minimum brightness in a dark room environment. The invention can constantly adjust the display screen to a target contrast ratio suitable for comfortable viewing by the human eye based on the ambient brightness, improving the readability of the display screen under different brightness environments.
[0029] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0030] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0031] Figure 1 This is a flowchart of a gamma curve generation method provided in Embodiment 1 of the present invention;
[0032] Figure 2A This is a flowchart of a gamma curve generation method provided in Embodiment 2 of the present invention;
[0033] Figure 2B A schematic diagram of a spreadsheet for generating gamma curves;
[0034] Figure 2C This is a schematic diagram of the gamma curve;
[0035] Figure 3 This is a flowchart of a contrast adjustment method provided in Embodiment 3 of the present invention;
[0036] Figure 4 This is a schematic diagram of a gamma curve generation device according to Embodiment 4 of the present invention;
[0037] Figure 5 This is a schematic diagram of the structure of a contrast adjustment device according to Embodiment 5 of the present invention;
[0038] Figure 6 This is a schematic diagram of the structure of the electronic device provided in Embodiment Six of the present invention. Detailed Implementation
[0039] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0040] Example 1
[0041] Figure 1 This is a flowchart of a gamma curve generation method provided in Embodiment 1 of the present invention. This embodiment is applicable to generating gamma curves corresponding to different ambient brightness levels, so as to adjust the contrast of the display screen by calling the corresponding gamma curve at different ambient brightness levels. This method can be executed by a gamma curve generation device, which can be implemented in hardware and / or software, and can be configured in an electronic device. Figure 1 As shown, the gamma curve generation method includes:
[0042] S101. Obtain the first display brightness of the display when the white field signal is input, and obtain the reflected brightness of the display under the target ambient brightness.
[0043] In this embodiment, the display screen can be a liquid crystal display screen, an LED display screen, or other display screens according to the display type. In terms of usage, it can be the display screen of a mobile terminal such as a mobile phone or tablet computer, or it can be the display screen of a personal computer or a large interactive flat panel.
[0044] The white field signal can be a signal that causes the display screen to display a white image. The display screen can be set in a dark room with no ambient light, and a white field signal can be input to the display screen to make it display a white image. The brightness of the white image is detected by a sensor and used as the first display brightness.
[0045] Reflected brightness refers to the brightness of the reflected light from the surface of the display screen. The target ambient brightness can be the brightness of the ambient light in any environment. Reflected brightness can be calculated based on the reflectivity of the material on the surface of the display screen, and can be specifically calculated by referring to the intensity of light reflection.
[0046] S102. The second gamma curve is obtained by superimposing the reflection brightness on the preset first gamma curve.
[0047] In this embodiment, the gamma curve reflects the display brightness at different gray levels. That is, the horizontal axis of the gamma curve is the gray level value, and the vertical axis is the display brightness value corresponding to each gray level value. One function of the gamma curve is to adjust the contrast of the display screen.
[0048] The first gamma curve can be the default gamma curve of the display screen, such as a gamma2.2 curve with a gamma coefficient of 2.2. For each gray level in the first gamma curve, the reflected brightness can be superimposed on the display brightness corresponding to that gray level. The gamma curve is refitted with the gray level value of each gray level and the brightness after superimposing the reflected brightness, to obtain the second gamma curve after superimposing the reflected brightness.
[0049] S103. Generate a third gamma curve based on the first display brightness, the reflected brightness, the second gamma curve, and the preset target contrast ratio, so as to use the gamma curve for adjusting the contrast ratio of the display screen to the target contrast ratio when the target ambient brightness is reached.
[0050] The preset target contrast ratio can be the contrast ratio that makes the human eye comfortable when viewing the display screen under any ambient light. In practical applications, the target contrast ratio can be obtained by simulating the comfortable reading experience provided by paper under different ambient lights. In one example, big data analysis shows that the reading experience of paper under any ambient light is more comfortable when the contrast ratio is 20:1. The purpose of this embodiment is to constantly adjust the contrast ratio of the display screen to 20:1 under different ambient lights using gamma curves. Therefore, it is necessary to generate gamma curves corresponding to different ambient lights. Of course, the target contrast ratio can also be determined according to the user's viewing habits. That is, the user can customize the contrast ratio that is relatively comfortable for their eyes when viewing the display screen, and it is not limited to 20:1.
[0051] In an optional embodiment, the second display brightness of each gray level can be calculated first using the first display brightness, the reflected brightness, and the preset target contrast. Then, a third gamma curve is generated based on the second display brightness and the second gamma curve to serve as the gamma curve for adjusting the contrast of the display screen to the target contrast when the target ambient brightness is reached.
[0052] Contrast ratio is the ratio of the brightness of a white screen to the brightness of a black screen. Specifically, in this embodiment, the first display brightness is the brightness of the white screen. The ratio of the sum of the first display brightness and the reflected brightness to the target contrast ratio is the minimum brightness of the black screen. After calculating the display brightness of each gray level when the preset gamma coefficient is calculated by using the sum of the first display brightness and the reflected brightness as the maximum brightness of the white screen, the sum of the display brightness of each gray level and the minimum brightness of the black screen is calculated to obtain the second display brightness of each gray level. Since the second display brightness of each gray level is superimposed with the minimum brightness, it is necessary to find the target display brightness that matches the second display brightness from the second gamma curve superimposed with ambient light. The gamma curve is fitted with the gray level value and the target display brightness to obtain the third gamma curve. The third gamma curve is the gamma curve for adjusting the contrast ratio of the display screen to the target contrast ratio when the ambient brightness is the target ambient brightness. When the brightness of the environment where the display screen is located is the target ambient brightness, the third gamma curve corresponding to the target ambient brightness can be called to adjust the contrast ratio of the display screen to the target contrast ratio, so that the display screen can adjust the contrast ratio to the target contrast ratio that is more comfortable for human eyes to read under different ambient brightness.
[0053] This invention, after acquiring the first display brightness of the display screen when a white field signal is input and the reflected brightness of the display screen under the target ambient brightness, generates a second gamma curve by superimposing the reflected brightness on the default first gamma curve. Based on the first display brightness, reflected brightness, and the second gamma curve, a gamma curve is generated to adjust the contrast of the display screen to the target contrast under the target ambient brightness. This achieves the adjustment of the display screen's contrast to a comfortable viewing contrast for the human eye by calling the corresponding gamma curve under different target ambient brightness conditions. This solves the problem of poor contrast and poor readability under ambient light caused by calculating contrast only based on the maximum and minimum brightness in a dark room. The invention can constantly adjust the display screen to a target contrast suitable for comfortable viewing under ambient light, improving the readability of the display screen under different brightness environments.
[0054] Example 2
[0055] Figure 2A This is a flowchart of a gamma curve generation method provided in Embodiment 2 of the present invention. This embodiment optimizes Embodiment 1 as described above. Figure 2A As shown, the gamma curve generation method includes:
[0056] S201. Obtain the first display brightness of the display screen when a white field signal is input, and obtain the reflected brightness of the display screen under the target ambient brightness.
[0057] In this embodiment, after setting the display screen in a dark room with no ambient light, a white field signal is input to the display screen to make the display screen display a white image, and the brightness of the white image is detected as the first display brightness.
[0058] Optionally, the product of the display's reflectivity and the target ambient brightness can be calculated, and the ratio of this product to pi can be used as the display's reflected brightness under the target ambient brightness, as shown in the following formula:
[0059]
[0060] In the above formula (1), L amb P is the reflectance of the display screen, E is the ambient light of the target environment, and π is the mathematical constant pi.
[0061] S202. Add the reflected brightness to the display brightness of each gray level i in the preset first gamma curve.
[0062] In an alternative embodiment, the first gamma curve can be generated in the following manner:
[0063] First, the display brightness at each gray level can be calculated using the following formula (2):
[0064]
[0065] Among them, L i L represents the display brightness of grayscale i. max The first display brightness of the screen when the white field signal is input is L, the total number of gray levels is m, and the preset gamma coefficient is used to fit the first gamma curve with gray level i and the display brightness of gray level i.
[0066] Taking an 8-bit display as an example, the value of i ranges from 0 to 255, m is 2.2, and L... max =200 lux, then the display brightness of each gray level i at a gamma factor of 2.2 can be calculated using the above formula, and a gamma 2.2 curve is fitted using gray level i and the corresponding display brightness, as shown below. Figure 2C The gamma2.2 curve shown is in Figure 2C In the graph, the horizontal axis represents grayscale values from 0 to 255, and the vertical axis represents display brightness from 0 to 200.
[0067] For each gray level i in the first gamma curve gamma2.2, the display brightness can be superimposed with the reflected brightness to obtain the brightness after superimposing the reflected brightness on gray level i.
[0068] S203. Fit the second gamma curve using the brightness obtained by superimposing grayscale i and the reflection brightness of grayscale i.
[0069] Specifically, such as Figure 2C The second gamma curve 200 lux is shown. The difference between the display brightness of each gray level i in the second gamma curve 200 lux and the display brightness of each gray level i in the first gamma curve gamma2.2 is equal to the reflected brightness.
[0070] S204. Calculate the second display brightness of each gray level based on the first display brightness, the reflected brightness, and the preset target contrast ratio.
[0071] In an optional embodiment, the sum of the first display brightness and the reflected brightness can be calculated, and the ratio of the sum to the preset target contrast ratio can be used to obtain the minimum display brightness. The second display brightness of each gray level can then be calculated using the following formula (3):
[0072]
[0073] Among them, L' i L' is the second display brightness of grayscale i when the target contrast is met. max L represents the display brightness corresponding to the maximum grayscale level in the second gamma curve. amb L0 represents the reflected brightness, and L0 represents the minimum display brightness at the target contrast.
[0074] in,
[0075]
[0076] In the formula above, as an example, the target contrast is 20.
[0077] S205. Generate a third gamma curve based on the second display brightness and the second gamma curve, so as to use the gamma curve to adjust the contrast of the display to the target contrast when the target ambient brightness is reached.
[0078] In an optional embodiment, for each gray level i corresponding to the second display brightness, it is determined whether there is a gray level in the second gamma curve whose display brightness is equal to the second display brightness. If so, the gray level in the second gamma curve whose display brightness is equal to the second display brightness is taken as the target gray level. If not, the target gray level is found in the second gamma curve, wherein the display brightness of the target gray level in the second gamma curve is less than the maximum value of the second display brightness. The display brightness of the target gray level in the second gamma curve is taken as the target display brightness of gray level i. The third gamma curve is fitted using gray level i and the target display brightness to serve as the gamma curve for adjusting the contrast of the display screen to the target contrast when the target ambient brightness is reached.
[0079] Specifically, a spreadsheet can be used to generate the third gamma curve, such as... Figure 2B In the spreadsheet shown, L in the table max =200 is the first display brightness of the screen, that is, the display brightness of the white screen. n=255 indicates that the screen is an 8-bit screen with a total of 256 gray levels, from gray level 0 to gray level 255. Ambient brightness (ambient illuminance) =200, reflectivity of the screen =4%. The reflected brightness L is obtained by formula (1) in S201. amb =2.5447770701, target contrast ratio =20:1, minimum display brightness is 10.1273885 after calculation by formula (4) in S204.
[0080] exist Figure 2B In the diagram, column A represents grayscale level i, and cells B9-B264 in column B represent the display brightness of each grayscale level i when the ambient brightness is 200 and the gamma factor is 2.2. By fitting a gamma curve with grayscale level i in cells A9-A264 as the x-axis and the display brightness in cells B9-B264, the following result is obtained: Figure 2C The gamma2.2 curve in the image.
[0081] Figure 2B In the diagram, cells C9-C264 represent the display brightness of each grayscale i in cells B9-B264 after overlaying the ambient brightness. By fitting a gamma curve with grayscale i from cells A9-A264 as the x-axis and the display brightness from cells C9-C264, the following result is obtained: Figure 2C The 200 lux curve in the image.
[0082] Figure 2BIn the formula, cells D9-D264 represent the second display brightness of each grayscale i when the ambient brightness is 200 and the contrast ratio is 20:1. The second display brightness in cells D9-D264 is calculated by formula (3) in S204. For each second display brightness in cells D9-D264, it can be determined whether there is an equal display brightness in cells C9-C264. If there is an equal display brightness, the grayscale corresponding to the cell in cells C9-C264 that has the same second display brightness as the cell in D9-D264 is taken as the target grayscale. If there is no equal display brightness, the largest display brightness less than that in cells D9-D264 is found in cells C9-C264, and the grayscale of the found display brightness is taken as the target grayscale. Finally, the display brightness corresponding to the target grayscale in the 200 lux curve is determined as the target display brightness, that is, the display brightness corresponding to the target grayscale in cells C9-C264 is taken as the target display brightness.
[0083] To illustrate the above process more clearly, gray levels 0 and 9 are used as examples. The second display brightness of gray level 0 is calculated to be 10.13 using formula (3), i.e. Figure 2B In cell D9, the second display brightness of grayscale 9 is calculated to be 10.25279914. The corresponding grayscale can then be found in cells C9-C264 using the MATCH function. Specifically, for the second display brightness of grayscale 0 (10.13), cell E9 can be set to MATCH(D9,C9:C264,1)-1, which means finding either a value equal to D9 (10.13) or the maximum value less than D9 (10.13) in cells C9-C264, and returning the position of the found value. Figure 2B As can be seen from the data, there is no value equal to 10.13 in cells C9-C264. The largest value less than 10.13 is 9.953473533, which is cell C66, or grayscale 57. Therefore, cell E9 = 57. This means that grayscale 57 in the second gamma curve of 200 lux is the target grayscale corresponding to grayscale 0 in the gamma curve of 20 contrast ratio. The display brightness of grayscale 0 in the gamma curve of 20 contrast ratio is equal to the display brightness corresponding to grayscale 57 in the second gamma curve of 200 lux. In other words, the display brightness of grayscale 0 in the gamma curve of 20 contrast ratio is 9.953473533.
[0084] Similarly, with a contrast ratio of 20, the second display brightness of grayscale 9 is 10.25279914. The corresponding grayscale can be found in cells C9-C264 using the MATCH function. Specifically, for the second display brightness of grayscale 9 (10.25279914), E18 can be set to MATCH(D18,C9:C264,1)-1. This means finding either the value equal to D18 (10.25279914) or the maximum value less than D18 (10.25279914) in cells C9-C264, and returning the position of the found value. Figure 2B As can be seen from the data, there is no value in cells C9-C264 equal to 10.25279914. The largest value less than 10.25279914 is 10.24231996, which is cell C67, or grayscale 58. Therefore, E18 = 58. This means that grayscale 58 in the second gamma curve of 200 lux is the target grayscale corresponding to grayscale 9 in the gamma curve of 20 contrast ratio. The display brightness of grayscale 9 in the gamma curve of 20 contrast ratio is equal to the display brightness corresponding to grayscale 58 in the second gamma curve of 200 lux. In other words, the display brightness of grayscale 9 in the gamma curve of 20 contrast ratio is 10.24231996.
[0085] Similarly, the target display brightness corresponding to each gray level at a contrast ratio of 20 is obtained. A third gamma curve is fitted using each gray level i in the contrast ratio of 20 and its corresponding target display brightness. This third gamma curve is the gamma curve for adjusting the contrast ratio to the target contrast ratio of 20 when the target ambient brightness is 200. Figure 2B The curve with contrast 20 shown is the third gamma curve.
[0086] In another optional embodiment, after generating the third gamma curve corresponding to each target ambient brightness, to avoid excessive ambient brightness data leading to a large number of third gamma curves and wasted storage space, the ambient brightness within a certain range can share a single gamma curve. Specifically, since the corresponding third gamma curves are quite similar when the ambient brightness does not change significantly, for example, the ambient brightness can be divided into multiple intervals at certain intervals, and the third gamma curve corresponding to the median value of the ambient brightness in each interval can be taken as the third gamma curve corresponding to all ambient brightness in that interval. Alternatively, the third gamma curves of all ambient brightness can be clustered to obtain multiple clusters, and the gamma curve corresponding to the center of the cluster can be taken as the third gamma curve of the ambient brightness interval of that cluster. In one example, the comparison table between the ambient brightness intervals and the third gamma curve with the contrast adjusted to 20:1 is shown in the table below:
[0087] 0 gamma0 400 gamma8 50 gamma1 500 gamma9 100 gamma2 600 gamma10 150 gamma3 750 gamma11 200 gamma4 900 gamma12 250 gamma5 1000 gamma13 300 gamma6 2000 gamma14 350 gamma7
[0088] In the table above, when the ambient brightness is 0-50, the gamma curve 0 is used to adjust the display contrast to the target contrast. When the ambient brightness is 320, the gamma curve 7 is used to adjust the display contrast to the target contrast. In practical applications, an index relationship between ambient brightness ranges and gamma curves can be established. This reduces the number of stored gamma curves, saving storage space, and allows for quick retrieval of the corresponding gamma curve based on ambient brightness, improving the efficiency of contrast adjustment.
[0089] In this embodiment, after acquiring the first display brightness of the display screen when a white field signal is input, and the reflected brightness of the display screen under the target ambient brightness, the display brightness of each gray level i in the preset first gamma curve is superimposed with the reflected brightness. The brightness of gray level i and the superimposed reflected brightness are then used to fit a second gamma curve. Furthermore, the second display brightness of each gray level is calculated based on the first display brightness, the reflected brightness, and the preset target contrast ratio. A third gamma curve is generated based on the second display brightness and the second gamma curve, serving as the gamma curve for adjusting the contrast ratio to the target contrast ratio when the display screen is under the target ambient brightness. Since the default first gamma curve... By superimposing reflected brightness to fit a second gamma curve, and generating a gamma curve based on the first display brightness, reflected brightness, and the second gamma curve to adjust the contrast of the display to the target contrast at the target ambient brightness, this method achieves the adjustment of the display contrast to a target contrast suitable for comfortable viewing by calling the corresponding gamma curve when the target ambient brightness is different. This solves the problem of poor contrast and poor display readability caused by calculating the contrast based only on the maximum and minimum brightness in a dark room environment. It can constantly adjust the display to a target contrast suitable for comfortable viewing by the human eye according to the ambient light, thus improving the readability of the display in different brightness environments.
[0090] Example 3
[0091] Figure 3 This is a flowchart of a contrast adjustment method provided in Embodiment 3 of the present invention. This embodiment is applicable to situations where the contrast of a display screen is adjusted according to ambient light. The method can be executed by a contrast adjustment device, which can be implemented in hardware and / or software and can be configured in an electronic device. Figure 3 As shown, the contrast adjustment method includes:
[0092] S301, Detect the target ambient brightness of the environment where the display screen is located.
[0093] In this embodiment, the display screen can be a liquid crystal display screen, an LED display screen, or other display screens according to the display type. From the perspective of usage, it can be the display screen of a mobile terminal such as a mobile phone or tablet computer, or it can be the display screen of a personal computer or a large interactive flat panel.
[0094] An ambient light sensor can be installed on the display screen to detect the illuminance of the environment in which the display screen is located, and thus obtain the target ambient brightness. In one example, when the display screen is a tablet computer, if the tablet computer is outdoors, the ambient light sensor on the tablet computer can detect the outdoor ambient brightness to obtain the target ambient brightness. It should be noted that the target ambient brightness is not fixed and can change with the environment. For example, when the display screen is moved from a location without direct sunlight to a location with direct sunlight outdoors, the ambient brightness changes. Or, when indoor lighting is switched from off to on, the ambient brightness changes. In this embodiment, the ambient brightness can be detected according to a preset period (3 seconds, 5 seconds, etc.) to obtain the target ambient brightness.
[0095] S302. Obtain the target gamma curve corresponding to the target ambient brightness.
[0096] In this embodiment, the target gamma curve corresponding to the target ambient brightness can refer to the gamma curve of adjusting the contrast of the display screen to a target contrast that is more comfortable for human eyes to read. For example, the target gamma curve corresponding to each ambient brightness can adjust the contrast of the display screen to 20:1 in different ambient brightness.
[0097] The gamma curve corresponding to the target ambient brightness can be generated by the gamma curve generation method provided in Embodiment 1 or Embodiment 2 and stored in the display screen. After the target ambient brightness is obtained, the gamma curve that matches the target ambient brightness can be found in the memory as the target gamma curve.
[0098] S303. Adjust the contrast of the display screen to the target contrast according to the target gamma curve.
[0099] Specifically, the white or black signal of the display screen can be adjusted according to the target gamma curve to change the brightness of the white or black screen displayed on the screen, thereby adjusting the contrast of the display screen to the target contrast.
[0100] The target gamma curve corresponding to the target ambient brightness in this embodiment is generated by the gamma curve generation methods of Embodiments 1 and 2. It obtains the first display brightness of the display screen when a white field signal is input, and the reflected brightness of the display screen under the target ambient brightness. A second gamma curve is obtained by superimposing the reflected brightness onto a preset first gamma curve. A third gamma curve is generated based on the first display brightness, reflected brightness, second gamma curve, and a preset target contrast ratio. This third gamma curve serves as the gamma curve for adjusting the contrast ratio of the display screen to the target contrast ratio under the target ambient brightness. Since the second gamma curve is generated by superimposing the reflected brightness onto the default first gamma curve, and the gamma curve for adjusting the contrast ratio of the display screen to the target contrast ratio under the target ambient brightness is generated based on the first display brightness, reflected brightness, and second gamma curve, it achieves the goal of adjusting the contrast ratio of the display screen to a target contrast ratio suitable for comfortable viewing by calling the corresponding gamma curve under different target ambient brightness conditions. This solves the problem of poor contrast ratio and poor readability of the display screen under ambient light caused by calculating the contrast ratio only based on the maximum and minimum brightness in a dark room environment. It can constantly adjust the display screen to a target contrast ratio suitable for comfortable viewing by the human eye based on the ambient light, improving the readability of the display screen under different brightness environments.
[0101] Example 4
[0102] Figure 4 This is a schematic diagram of a gamma curve generation device provided in Embodiment 4 of the present invention. Figure 4 As shown, the gamma curve generation device includes:
[0103] The brightness acquisition module 401 is used to acquire the first display brightness of the display screen when a white field signal is input, and to acquire the reflected brightness of the display screen under the target ambient brightness.
[0104] Gamma curve generation module 402 is used to superimpose the reflected brightness onto a preset first gamma curve to obtain a second gamma curve;
[0105] Gamma curve generation module 403 is used to generate a third gamma curve based on the first display brightness, the reflected brightness, the second gamma curve and the preset target contrast, so as to serve as the gamma curve for adjusting the contrast of the display screen to the target contrast when the display screen is in the environment of the target ambient brightness.
[0106] Optionally, the brightness acquisition module 401 includes:
[0107] A product calculation unit is used to calculate the product of the reflectivity of the display screen and the brightness of the target environment;
[0108] A reflectance brightness calculation unit is used to calculate the ratio of the product to pi, so as to use the reflectance brightness of the display screen under the target ambient brightness.
[0109] Optionally, the gamma curve generation module 402 includes:
[0110] A reflective brightness superposition unit is used to superimpose the reflective brightness on the display brightness of each gray level i in a preset first gamma curve;
[0111] The second gamma curve fitting unit is used to fit the second gamma curve using the gray level i and the brightness after superimposing the gray level i with the reflected brightness.
[0112] Optionally, the gamma curve generation module 403 includes:
[0113] The second display brightness calculation unit is used to calculate the second display brightness of each gray level based on the first display brightness, the reflected brightness and the preset target contrast.
[0114] The third gamma curve fitting unit is used to generate a third gamma curve based on the second display brightness and the second gamma curve, so as to serve as the gamma curve for adjusting the contrast of the display screen to the target contrast when the display screen is in the environment of the target ambient brightness.
[0115] Optionally, the second display brightness calculation unit includes:
[0116] A sum calculation unit is used to calculate the sum of the first display brightness and the reflected brightness;
[0117] The minimum display brightness calculation unit is used to calculate the ratio of the sum value to the preset target contrast ratio to obtain the minimum display brightness;
[0118] The grayscale display brightness calculation unit is used to calculate the second display brightness of each grayscale level according to the following formula:
[0119]
[0120] Among them, L' i L' is the second display brightness of grayscale i when the target contrast is met. max L represents the display brightness corresponding to the maximum grayscale level in the second gamma curve. amb L0 represents the reflected brightness, and L0 represents the minimum display brightness at the target contrast.
[0121] Optionally, the third gamma curve fitting unit includes:
[0122] The display brightness determination unit is used to determine whether there is a gray level in the second gamma curve whose display brightness is equal to the second display brightness for each gray level i;
[0123] The target grayscale determination unit is used to take the grayscale in the second gamma curve whose display brightness is equal to the second display brightness as the target grayscale.
[0124] The target grayscale lookup unit finds the target grayscale in the second gamma curve, wherein the display brightness of the target grayscale in the second gamma curve is less than the maximum value of the second display brightness;
[0125] A grayscale brightness determination unit is used to take the display brightness of the target grayscale in the second gamma curve as the target display brightness of the grayscale i.
[0126] A curve fitting unit is used to fit a third gamma curve using the grayscale i and the target display brightness, so as to serve as the gamma curve for adjusting the contrast of the display screen to the target contrast when the target ambient brightness is in the environment.
[0127] The gamma curve generation device provided in this embodiment of the invention can execute the gamma curve generation method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method.
[0128] Example 5
[0129] Figure 5 This is a schematic diagram of a contrast adjustment device provided in Embodiment 5 of the present invention. Figure 5 As shown, the contrast adjustment device includes:
[0130] The target environment brightness detection module 501 is used to detect the target environment brightness of the environment in which the display screen is located.
[0131] The target gamma curve calling module 502 is used to obtain the target gamma curve corresponding to the target ambient brightness.
[0132] The contrast adjustment module 503 is used to adjust the contrast of the display screen to the target contrast according to the target gamma curve;
[0133] The gamma curve corresponding to the target ambient brightness is generated according to the gamma curve generation method described in Embodiment 1 and Embodiment 2.
[0134] The contrast adjustment device provided in this embodiment of the invention can execute the contrast adjustment method provided in Embodiment 3 of the invention, and has the corresponding functional modules and beneficial effects of the method.
[0135] Example 6
[0136] Figure 6 A schematic diagram of an electronic device 60 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0137] like Figure 6 As shown, the electronic device 60 includes at least one processor 61 and a memory, such as a read-only memory (ROM) 62 and a random access memory (RAM) 63, communicatively connected to the at least one processor 61. The memory stores computer programs executable by the at least one processor. The processor 61 can perform various appropriate actions and processes based on the computer program stored in the ROM 62 or loaded into the RAM 63 from storage unit 68. The RAM 63 may also store various programs and data required for the operation of the electronic device 60. The processor 61, ROM 62, and RAM 63 are interconnected via a bus 64. An input / output (I / O) interface 65 is also connected to the bus 64.
[0138] Multiple components in electronic device 60 are connected to I / O interface 65, including: input unit 66, such as keyboard, mouse, etc.; output unit 67, such as various types of monitors, speakers, etc.; storage unit 68, such as disk, optical disk, etc.; and communication unit 69, such as network card, modem, wireless transceiver, etc. Communication unit 69 allows electronic device 60 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0139] Processor 61 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 61 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 61 performs the various methods and processes described above, such as gamma curve generation methods and / or contrast adjustment methods.
[0140] In some embodiments, the gamma curve generation method and / or contrast adjustment method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 68. In some embodiments, part or all of the computer program may be loaded into and / or installed on electronic device 60 via ROM 62 and / or communication unit 69. When the computer program is loaded into RAM 63 and executed by processor 61, one or more steps of the gamma curve generation method and / or contrast adjustment method described above may be performed. Alternatively, in other embodiments, processor 61 may be configured to perform the gamma curve generation method and / or contrast adjustment method by any other suitable means (e.g., by means of firmware).
[0141] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0142] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0143] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0144] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0145] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0146] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0147] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0148] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for generating gamma curves, characterized in that, include: The display screen's first display brightness is obtained when a white field signal is input, and the reflected brightness of the display screen is obtained under the target ambient brightness. The second gamma curve is obtained by superimposing the reflected brightness onto the preset first gamma curve; A third gamma curve is generated based on the first display brightness, the reflected brightness, the second gamma curve, and the preset target contrast, so as to serve as the gamma curve for adjusting the contrast of the display screen to the target contrast when the display screen is in the environment of the target ambient brightness. The step of generating a third gamma curve based on the first display brightness, the reflected brightness, the second gamma curve, and a preset target contrast ratio includes: The second display brightness for each grayscale level is calculated based on the first display brightness, the reflected brightness, and the preset target contrast. A third gamma curve is generated based on the second display brightness and the second gamma curve to serve as the gamma curve for adjusting the contrast of the display screen to the target contrast when the display screen is in an environment with the target ambient brightness.
2. The gamma curve generation method as described in claim 1, characterized in that, The step of obtaining the reflected brightness of the display screen under the target ambient brightness includes: Calculate the product of the reflectivity of the display screen and the brightness of the target environment; The ratio of the product to pi is calculated to determine the reflected brightness of the display screen under the target ambient brightness.
3. The gamma curve generation method as described in claim 1, characterized in that, The step of superimposing the reflected brightness onto a preset first gamma curve to obtain a second gamma curve includes: The display brightness of each gray level i in the preset first gamma curve is superimposed with the reflected brightness; The second gamma curve is fitted using the gray level i and the brightness obtained by superimposing the reflected brightness on the gray level i.
4. The gamma curve generation method as described in claim 1, characterized in that, The step of calculating the second display brightness for each grayscale level based on the first display brightness, the reflected brightness, and the preset target contrast includes: Calculate the sum of the first display brightness and the reflected brightness; Calculate the ratio of the sum to the preset target contrast ratio to obtain the minimum display brightness; The second display brightness for each grayscale level is calculated using the following formula: + in, The second display brightness of grayscale i when the target contrast is met. This represents the display brightness corresponding to the maximum grayscale level in the second gamma curve. For reflected brightness, The minimum display brightness is the target contrast ratio, L is the total number of gray levels, and m is the preset gamma coefficient.
5. The gamma curve generation method as described in claim 1, characterized in that, The step of generating a third gamma curve based on the second display brightness and the second gamma curve, to serve as the gamma curve for adjusting the contrast of the display screen to the target contrast when the display screen is in an environment with the target ambient brightness, includes: For each gray level i corresponding to the second display brightness, determine whether there is a gray level in the second gamma curve whose display brightness is equal to the second display brightness; If so, the gray level in the second gamma curve whose brightness is equal to the second display brightness shall be taken as the target gray level; If not, find the target gray level in the second gamma curve, wherein the display brightness of the target gray level in the second gamma curve is less than the maximum value of the second display brightness; The display brightness of the target grayscale in the second gamma curve is taken as the target display brightness of grayscale i. The grayscale i and the target display brightness are used to fit a third gamma curve to serve as the gamma curve for adjusting the contrast of the display screen to the target contrast when the target ambient brightness is met.
6. A contrast adjustment method, characterized in that, include: Detect the target ambient brightness of the environment in which the display screen is located; Obtain the target gamma curve corresponding to the target ambient brightness; The contrast of the display screen is adjusted to the target contrast based on the target gamma curve; The gamma curve corresponding to the target ambient brightness is generated by the gamma curve generation method according to any one of claims 1-5.
7. A gamma curve generation device, characterized in that, include: The brightness acquisition module is used to acquire the first display brightness of the display screen when a white field signal is input, and to acquire the reflected brightness of the display screen under the target ambient brightness. Gamma curve generation module one is used to superimpose the reflected brightness onto a preset first gamma curve to obtain a second gamma curve; Gamma curve generation module two is used to generate a third gamma curve based on the first display brightness, the reflected brightness, the second gamma curve and the preset target contrast, so as to serve as the gamma curve for adjusting the contrast of the display screen to the target contrast when the display screen is in the environment of the target ambient brightness. The second gamma curve generation module includes: The second display brightness calculation unit is used to calculate the second display brightness of each gray level based on the first display brightness, the reflected brightness and the preset target contrast. The third gamma curve fitting unit is used to generate a third gamma curve based on the second display brightness and the second gamma curve, so as to serve as the gamma curve for adjusting the contrast of the display screen to the target contrast when the display screen is in the environment of the target ambient brightness.
8. A contrast adjustment device, characterized in that, include: The target environment brightness detection module is used to detect the target environment brightness of the environment in which the display screen is located; The target gamma curve calling module is used to obtain the target gamma curve corresponding to the target ambient brightness; A contrast adjustment module is used to adjust the contrast of the display screen to the target contrast according to the target gamma curve; The gamma curve corresponding to the target ambient brightness is generated by the gamma curve generation method according to any one of claims 1-5.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the gamma curve generation method of any one of claims 1-5, and / or the contrast adjustment method of claim 6.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the gamma curve generation method of any one of claims 1-5, and / or the contrast adjustment method of claim 6.
Citation Information
Patent Citations
Display screen time period-based adjustment display optimization method
CN105118434A
Display method and display device
CN111916031A
Liquid crystal projection device
JP1999234539A