Interface display method and device and electronic equipment
By acquiring the grayscale-contrast curve and adjusting the grayscale values of the VR device's display interface, the ghosting and light leakage issues of VR devices in high-contrast scenes were resolved, improving the interface display effect and immersive experience.
Patent Information
- Application Number
- CN202511382440.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-25
- Publication Date
- 2025-11-18
AI Technical Summary
VR devices suffer from ghosting and light leakage issues in high-contrast scenes, affecting the user's immersive experience. Existing hardware designs handle these issues poorly.
By acquiring the grayscale-contrast curve of the display interface, the target grayscale value is determined based on the target contrast. The grayscale value of the background area is increased to reduce the halo contrast. Specifically, this includes adjusting the grayscale value of the background area and the grayscale value of the subject area.
It effectively reduces halos in the display interface, improves the interface display effect, and enhances the immersive experience.
Smart Images

Figure CN120977232A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of interface display technology, specifically relating to an interface display method, device, and electronic device. Background Technology
[0002] VR (Virtual Reality) devices are immersive experience devices, typically equipped with masks to block out ambient light, allowing users to immerse themselves in virtual reality scenes in a dark environment. During the use of VR devices, there are often high-contrast scenes where a bright window is displayed against a black background; for example, the opening animation of a game application is usually a high-contrast image with a black background and highlighted text.
[0003] Currently, mainstream VR devices use a polarized folded optical path design, which can lead to ghosting and light leakage issues, especially in high-contrast scenes, resulting in halos. In dark environments, the human pupil dilates and becomes more sensitive to brightness, particularly low-brightness stray light. The halos formed in high-contrast scenes can then be detected, affecting the user's immersive experience, necessitating halo processing.
[0004] However, in related technologies, the method of handling halos through VR lens hardware design has a poor effect on halos, which reduces the display effect of virtual scenes. Summary of the Invention
[0005] The purpose of this application is to provide an interface display method, device, and electronic device that can improve the processing effect of halo in the display interface and improve the interface display effect.
[0006] In a first aspect, embodiments of this application provide an interface display method, comprising: acquiring a grayscale-contrast curve of the display interface when the halo contrast of the display interface is greater than a target contrast, wherein the display interface includes a background area and a main area, the brightness of the background area is less than the brightness of the main area, and the grayscale-contrast curve is used to indicate the correspondence between the grayscale value of the background area and the halo contrast of the display interface when only the grayscale value of the background area is increased; determining a target grayscale value based on the grayscale-contrast curve and the target contrast; and increasing the grayscale value of the background area based on the target grayscale value so that the halo contrast of the display interface is less than or equal to the target contrast.
[0007] Secondly, embodiments of this application provide an interface display device, comprising: an acquisition unit, configured to acquire a grayscale-contrast curve of the display interface when the halo contrast of the display interface is greater than a target contrast, the display interface including a background area and a main area, the brightness of the background area being less than the brightness of the main area, the grayscale-contrast curve being used to indicate the correspondence between the grayscale value of the background area and the halo contrast of the display interface when only the grayscale value of the background area is increased; a processing unit, configured to determine a target grayscale value based on the grayscale-contrast curve and the target contrast; the processing unit is further configured to increase the grayscale value of the background area based on the target grayscale value, so that the halo contrast of the display interface is less than or equal to the target contrast.
[0008] Thirdly, embodiments of this application provide an electronic device, including a processor and a memory, wherein the memory stores a program or instructions that can run on the processor, and when the program or instructions are executed by the processor, they implement the steps of the interface display method as described in the first aspect.
[0009] Fourthly, embodiments of this application provide a readable storage medium storing a program or instructions, which, when executed by a processor, implement the steps of the interface display method as described in the first aspect.
[0010] Fifthly, embodiments of this application provide a chip including a processor and a communication interface, the communication interface and the processor being coupled, the processor being used to run programs or instructions to implement the steps of the interface display method as described in the first aspect.
[0011] In a sixth aspect, embodiments of this application provide a computer program product, which is stored in a storage medium and executed by at least one processor to implement the steps of the interface display method as described in the first aspect.
[0012] In the interface display method provided in this application embodiment, when the halo contrast of the display interface is greater than the target contrast, a grayscale-contrast curve of the display interface is obtained. The display interface includes a background area and a main area, and the brightness of the background area is less than the brightness of the main area. The grayscale-contrast curve is used to indicate the correspondence between the grayscale value of the background area and the halo contrast of the display interface when only the grayscale value of the background area is increased. Based on the grayscale-contrast curve and the target contrast, a target grayscale value is determined. Based on the target grayscale value, the grayscale value of the background area is increased so that the halo contrast of the display interface is less than or equal to the target contrast. Through the above interface display method, when the halo contrast of the display interface is greater than the target contrast, a preset grayscale-contrast curve is obtained. Based on the correspondence between the grayscale value of the background area and the halo contrast of the display interface when only the grayscale value of the background area is increased, as indicated by the grayscale-contrast curve, a target grayscale value is determined according to the target contrast. Then, based on the target grayscale value, the grayscale value of the background area with lower brightness in the display interface is increased so that the halo contrast of the display interface is less than or equal to the target contrast. In this way, for display interfaces with high halo contrast, based on the preset grayscale-contrast curve, the grayscale value of the low-brightness background area is increased, thereby reducing the halo contrast of the display interface. This can effectively reduce the halo in the display interface, improve the halo processing effect in the display interface, and thus improve the interface display effect. Attached Figure Description
[0013] Figure 1 A flowchart illustrating the interface display method provided in an embodiment of this application;
[0014] Figure 2 One of the display effect diagrams of the display interface provided in the embodiments of this application;
[0015] Figure 3 The second illustration shows the display effect of the display interface provided in the embodiments of this application;
[0016] Figure 4 This is one of the example grayscale-contrast curves provided in the embodiments of this application;
[0017] Figure 5 Example diagram of grayscale-contrast curve provided in the embodiments of this application;
[0018] Figure 6 The third illustration shows the display effect of the display interface provided in the embodiments of this application;
[0019] Figure 7 This is a structural block diagram of the interface display device provided in the embodiments of this application;
[0020] Figure 8 A structural block diagram of the electronic device provided in the embodiments of this application;
[0021] Figure 9 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0022] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0023] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0024] The interface display method, apparatus, and electronic device provided in this application will be described in detail below with reference to the accompanying drawings and through specific embodiments and application scenarios.
[0025] like Figure 1 As shown, this application embodiment provides an interface display method, including the following S102 to S106:
[0026] S102: When the halo contrast of the display interface is greater than the target contrast, obtain the grayscale-contrast curve of the display interface.
[0027] The interface display method proposed in this application is executed by an electronic device, which may be a VR device, such as VR glasses, VR headsets, and VR helmets, etc., and is not specifically limited here.
[0028] The display interface includes a background area and a main area, with the brightness of the background area being less than that of the main area.
[0029] Optionally, the halo contrast ratio is used to describe the display effect of the halo in the display interface. The halo contrast ratio is related to the halo brightness and the background area brightness of the display interface. Specifically, the halo contrast ratio = (halo brightness + background area brightness) / background area brightness.
[0030] Optionally, the grayscale-contrast curve is used to indicate the correspondence between the grayscale value of the background area and the halo contrast of the display interface when only the grayscale value of the background area is increased.
[0031] In practical applications, the grayscale-contrast curve is data pre-stored in the memory of electronic devices and can be directly retrieved and used.
[0032] The grayscale-contrast curves stored in electronic devices vary depending on factors such as the device's model and version. In other words, the grayscale-contrast curves are set according to the specific characteristics of the electronic device.
[0033] Optionally, the target contrast is a preset value stored in the memory of the electronic device.
[0034] Optionally, the target contrast ratio is used as the basis for judging the strength of the halo display effect in the display interface.
[0035] Optionally, the target contrast ratio is the threshold value at which the halo display effect in the display interface can be significantly improved. If the halo contrast ratio of the display interface is less than or equal to the target contrast ratio, it indicates that the halo display effect in the display interface has been significantly improved. Alternatively, the target contrast ratio is the threshold value at which the halo display effect in the display interface can be eliminated. If the halo contrast ratio of the display interface is less than or equal to the target contrast ratio, it indicates that the halo in the display interface has been eliminated.
[0036] In practical applications, the target contrast can be a fixed value that can be customized by those skilled in the art.
[0037] Alternatively, the target contrast can also be determined by finding the inflection point of the grayscale-contrast curve. For example, as Figure 4 and Figure 5 As shown, the halo contrast corresponding to the inflection point of the grayscale-contrast curve is approximately 1.5, so the target contrast can be set to 1.5.
[0038] S104: Determine the target grayscale value based on the grayscale-contrast curve and the target contrast.
[0039] Among them, the target grayscale value corresponds to the target contrast.
[0040] Specifically, the target grayscale value is obtained by finding the corresponding grayscale value in the grayscale-contrast curve, using the target contrast as the contrast input value of the grayscale-contrast curve.
[0041] Depending on the target contrast, the halo processing effect achievable by the target grayscale value will vary. Those skilled in the art can set the target contrast value according to the actual situation to achieve the processing effect of improving or even eliminating halo based on the corresponding target grayscale value.
[0042] For example, a target contrast ratio of 20 and a target grayscale value of 8 are used to improve the halo effect; a target contrast ratio of 1.5 and a target grayscale value of 40 are used to eliminate the halo effect.
[0043] S106: Based on the target grayscale value, increase the grayscale value of the background area so that the halo contrast of the display interface is less than or equal to the target contrast.
[0044] Specifically, in the interface display method provided in this application embodiment, when the halo contrast of the display interface is greater than the target contrast, that is, for a display interface with obvious halo display effect, a preset grayscale-contrast curve is obtained. Based on the correspondence between the grayscale value of the background area and the halo contrast of the display interface when only the grayscale value of the background area is increased, as indicated by the grayscale-contrast curve, the target grayscale value required for halo processing is determined in combination with the target contrast. Then, based on the target grayscale value, the grayscale value of the background area with lower brightness in the display interface is increased, so that the halo contrast of the display interface is less than or equal to the target contrast, thereby improving or even eliminating the halo problem in the display interface.
[0045] For example, when the grayscale value of the main area remains unchanged, but the grayscale value of the background area is increased, the halo processing results are shown in Table 1 below:
[0046] Table 1
[0047]
[0048] For example, such as Figure 2 As shown, in a display interface with a white subject against a black background, a halo forms around the white subject. Increasing the grayscale value of the lower-brightness black background in the display interface results in... Figure 3 As shown, the halo around the white subject has clearly disappeared.
[0049] The interface display method provided in this application, when the halo contrast of the display interface is greater than the target contrast, acquires a grayscale-contrast curve of the display interface. The display interface includes a background area and a main area, and the brightness of the background area is less than the brightness of the main area. The grayscale-contrast curve is used to indicate the correspondence between the grayscale value of the background area and the halo contrast of the display interface when only the grayscale value of the background area is increased. Based on the grayscale-contrast curve and the target contrast, a target grayscale value is determined. Based on the target grayscale value, the grayscale value of the background area is increased so that the halo contrast of the display interface is less than or equal to the target contrast. Through the above interface display method, when the halo contrast of the display interface is greater than the target contrast, a preset grayscale-contrast curve is acquired. Based on the correspondence between the grayscale value of the background area and the halo contrast of the display interface when only the grayscale value of the background area is increased, as indicated by the grayscale-contrast curve, a target grayscale value is determined according to the target contrast. Then, based on the target grayscale value, the grayscale value of the background area with lower brightness in the display interface is increased so that the halo contrast of the display interface is less than or equal to the target contrast. In this way, for display interfaces with high halo contrast, based on the preset grayscale-contrast curve, the grayscale value of the low-brightness background area is increased, thereby reducing the halo contrast of the display interface. This can effectively reduce the halo in the display interface, improve the halo processing effect in the display interface, and thus improve the interface display effect.
[0050] In this embodiment of the application, the step of increasing the grayscale value of the background area based on the target grayscale value may specifically include the following steps S108 and S110:
[0051] S108: Increase the grayscale value of the first area in the background area to the target grayscale value.
[0052] The first region is the region in the background area whose distance from the region boundary is less than or equal to the first distance.
[0053] The regional boundary is the boundary between the background region and the main region.
[0054] In practical applications, those skilled in the art can set the specific value of the first distance according to the actual situation, and no specific restrictions are imposed here.
[0055] S110: Increase the grayscale value of the second region in the background area, so that the grayscale value of the background area decreases in order of increasing distance from the region boundary.
[0056] The second region is the area in the background region whose distance from the region boundary is greater than the first distance.
[0057] Specifically, in the interface display method provided in the embodiments of this application, after determining the target grayscale value, the global grayscale value of the background area can be increased to the target grayscale value.
[0058] Alternatively, the grayscale value of the first area adjacent to the main subject area in the background region can be increased to the target grayscale value. For the second area farther from the main subject area, the grayscale adjustment value can be gradually decreased in order of increasing distance from the area boundary. This results in the grayscale value of the background area decreasing in order of increasing distance from the area boundary. In this way, grayscale values are adjusted primarily for areas adjacent to the main subject area, while the background area achieves a gradual decrease in grayscale value from the area boundary to the display interface boundary, realizing a gradient black effect in the background area. This reduces the impact of grayscale adjustment on the background design while maintaining the halo effect.
[0059] Understandably, the stronger the halo, the more the brightness of the background area needs to be increased, and the more the grayscale value of the background area needs to be increased. In practical applications, the target grayscale value can be used as the lower limit for adjusting the grayscale value of the background area, that is, adjusting the grayscale value of the background area to be greater than or equal to the target grayscale value to ensure the halo processing effect.
[0060] The embodiments provided in this application increase the grayscale value of a first region in the background area to a target grayscale value. The first region is a region in the background area whose distance from the region boundary is less than or equal to a first distance, and the region boundary is the boundary between the background area and the main body area. The grayscale value of a second region in the background area is also increased, such that the grayscale values of the background area decrease in order of increasing distance from the region boundary. The second region is a region in the background area whose distance from the region boundary is greater than the first distance. In this way, while ensuring the halo effect, the impact of grayscale adjustment on the background design is reduced.
[0061] In this embodiment of the application, the step of increasing the grayscale value of the background area based on the target grayscale value may specifically include the following S112 and S114:
[0062] S112: Increase the grayscale value of the green light channel in the background area to the target grayscale value.
[0063] Specifically, in the interface display method provided in the embodiments of this application, after determining the target grayscale value, the grayscale values of the R (Red) channel, G (Green) channel and B (Blue) channel of the background area can be simultaneously increased to the target grayscale value.
[0064] It is understandable that, for the same grayscale value, the proportion of brightness in different channels is highest in the G channel, followed by the R channel, and lowest in the B channel. Here, grayscale brightness refers to the brightness value corresponding to the grayscale value.
[0065] For example, as shown in Table 2 below, when the grayscale value is 28, the grayscale brightness of the G channel is 0.332, the grayscale brightness of the R channel is 0.111, the grayscale brightness of the B channel is 0.045, the brightness ratio of the G channel is 68%, the brightness ratio of the R channel is 23%, and the brightness ratio of the B channel is 9%.
[0066] Table 2
[0067]
[0068]
[0069] Based on this, in practical applications, after determining the target grayscale value, the grayscale value of the green light channel (G channel) of the background area can be adjusted to be greater than or equal to the target grayscale value.
[0070] S114: If the halo contrast of the display interface is still greater than the target contrast, then increase the grayscale value of the red light channel and / or blue light channel of the background area to the target grayscale value.
[0071] Specifically, in the interface display method provided in this application embodiment, after adjusting the grayscale value of the green light channel (G channel) of the background area, if the halo contrast of the displayed interface is still greater than the target contrast, the grayscale values of the red light channel (R channel) and / or the blue light channel (B channel) of the background area can be adjusted to be greater than or equal to the target grayscale value. Specifically, the grayscale value of the R channel can be adjusted first according to the brightness ratio of the R channel and the B channel, and the grayscale value of the B channel can be adjusted only when the halo contrast of the displayed interface is still greater than the target contrast.
[0072] For example, with the grayscale value of the main area remaining unchanged, the halo processing results of the R channel, G channel, and B channel under different grayscale value adjustment schemes for the background area are shown in Table 3 below:
[0073] Table 3
[0074]
[0075] The embodiments provided in this application increase the grayscale value of the green light channel in the background area to the target grayscale value; if the halo contrast of the display interface is still greater than the target contrast, the grayscale values of the red light channel and / or blue light channel in the background area are then increased to the target grayscale value. In this way, while ensuring the halo processing effect, the limitations on UI (User Interface) design are reduced.
[0076] In the embodiments of this application, the halo contrast is related to the ratio of the grayscale brightness of the main area and the background area, and is also related to the intensity ratio of the third area in the background area.
[0077] Among them, grayscale brightness is used to indicate the brightness value corresponding to the grayscale value.
[0078] The third region is the area in the background region whose distance from the region boundary is less than or equal to the second distance.
[0079] The specific value of the second distance can be set by those skilled in the art according to the actual situation, and no specific restrictions are imposed here.
[0080] In practical applications, the aforementioned third region can specifically be the halo region.
[0081] The intensity ratio of the third region is the ratio of the brightness of the third region to that of the main region. The intensity ratio of the third region is also known as the halo intensity ratio.
[0082] In practical applications, the halo intensity ratio, i.e. the intensity ratio of the third region, can be calculated using the following formula (1):
[0083] X% = Brightness value of the third region / Brightness value of the main region (1)
[0084] Where X% represents the halo intensity ratio, i.e., the intensity ratio of the third region.
[0085] Based on this, the halo contrast can be calculated using the following formula (2):
[0086] C=(Lb×X%+La) / La(2)
[0087] Where C represents the halo contrast, Lb represents the grayscale brightness of the main area, and La represents the grayscale brightness of the background area.
[0088] For example, such as Figure 6 The halo intensity ratio measured on the displayed interface is 0.73%. The halo contrast varies with the grayscale of the background area as shown in Table 4 below:
[0089] Table 4
[0090] Background area grayscale Halo contrast 0 80 5 50 8 20 12 10 16 5 24 3 48 1.4
[0091] Based on this, in the grayscale-contrast curve, the grayscale value of the background area is inversely proportional to the halo contrast of the display interface.
[0092] Specifically, in practical applications, for electronic devices, the halo intensity ratio of the display interface can be measured, and the brightness value corresponding to each gray level value from 0 to 255, i.e., gray level brightness, can be measured. Then, while keeping the gray level value of the main area unchanged, the gray level value of the background area can be gradually increased, and the halo contrast of the background area at different gray level values can be calculated. And while keeping the gray level value of the background area unchanged, the gray level value of the main area can be gradually decreased, and the halo contrast of the main area at different gray level values can be calculated.
[0093] Based on this, and according to the above calculation results, grayscale-contrast curves are constructed for two cases: grayscale value changes only in the main subject area and grayscale value changes only in the background area, as shown below. Figure 3 and Figure 4 As shown. In this way, based on the grayscale-contrast curve, the intensity of the halo can be quantified, the background brightness and the halo intensity can be balanced, and the halo processing effect can be improved.
[0094] In the embodiments provided in this application, the halo contrast is related to the ratio of the grayscale brightness of the main area and the background area, and also to the intensity ratio of a third region within the background area. Grayscale brightness indicates the brightness value corresponding to the grayscale value. The third region is the area in the background area whose distance from the region boundary is less than or equal to a second distance. The intensity ratio is the ratio of the brightness of the third region to that of the main area. In the grayscale-contrast curve, the grayscale value of the background area is inversely proportional to the halo contrast of the display interface. Thus, based on the grayscale-contrast curve, the halo intensity can be quantified, balancing the background brightness and halo intensity, thereby improving the halo processing effect.
[0095] In this embodiment of the application, the above-mentioned interface display method may further include the following S116 and / or S118:
[0096] S116: If the halo contrast of the display interface is greater than the target contrast, reduce the grayscale value of the main area.
[0097] Understandably, the halo problem is caused by an excessive difference in brightness between the ghosting effect in the subject area and the adjacent background area. The lower the grayscale of the subject area, the lower its brightness, and the halo will decrease proportionally.
[0098] Therefore, in the interface display method provided in this application embodiment, when the halo contrast of the display interface is greater than the target contrast, the halo can be weakened by reducing the grayscale value of the main area to improve the halo problem.
[0099] For example, when the grayscale value of the background area remains unchanged and only the grayscale value of the subject area is adjusted, the halo processing results are shown in Table 5 below:
[0100] Table 5
[0101] grayscale of the main area Background area grayscale Halo processing results W255 0 Obvious halo W227 0 The halo effect has been slightly improved. B255 0 The halo turned blue and became more pronounced.
[0102] S118: If the halo contrast of the display interface is greater than the target contrast, reduce the display area of the main body area.
[0103] Understandably, the size of the halo area will vary depending on the size of the main body area.
[0104] In the interface display method provided in this application embodiment, when the halo contrast of the display interface is greater than the target contrast, the halo area can be reduced by reducing the display area of the main area, thereby improving the halo problem.
[0105] In practical applications, the halo effect can be further improved by combining three processing methods: increasing the grayscale value of the background area, decreasing the grayscale value of the main area, and reducing the display area of the main area.
[0106] The embodiments provided in this application reduce the grayscale value of the main area when the halo contrast of the display interface is greater than the target contrast; and / or reduce the display area of the main area when the halo contrast of the display interface is greater than the target contrast. In this way, improving the halo problem by adjusting the main area can be combined with increasing the grayscale value of the background area to enhance the halo processing effect.
[0107] In the embodiments of this application, the target contrast ratio is ≤20.
[0108] In the interface display method provided in this application embodiment, the target contrast value range corresponding to the halo improvement processing result can be set based on the actual processing requirements of the halo: target contrast ≤ 20.
[0109] In the embodiments provided in this application, the target contrast ratio is ≤20. Therefore, adjusting the halo contrast of the display interface based on the target contrast ratio can effectively improve the halo problem in the display interface and enhance the display effect.
[0110] In the embodiments of this application, the target contrast is ≤1.5.
[0111] In the interface display method provided in this application embodiment, the target contrast value range corresponding to the halo elimination processing effect can be set based on the actual processing requirements of the halo: target contrast ≤ 1.5.
[0112] In the embodiments provided in this application, the target contrast ratio is ≤1.5. Therefore, by adjusting the halo contrast of the display interface based on the target contrast ratio, halo problems in the display interface can be effectively eliminated, improving the interface display effect.
[0113] The interface display method provided in this application can be executed by an interface display device. This application uses an interface display device executing the above-described interface display method as an example to illustrate the interface display device provided in this application.
[0114] like Figure 7 As shown, this application embodiment provides an interface display device 500, including the acquisition unit 502 and the processing unit 504 described below.
[0115] The acquisition unit 502 is used to acquire the grayscale-contrast curve of the display interface when the halo contrast of the display interface is greater than the target contrast. The display interface includes a background area and a main area. The brightness of the background area is less than the brightness of the main area. The grayscale-contrast curve is used to indicate the correspondence between the grayscale value of the background area and the halo contrast of the display interface when only the grayscale value of the background area is increased.
[0116] Processing unit 504 is used to determine the target grayscale value based on the grayscale-contrast curve and the target contrast.
[0117] The processing unit 504 is also used to increase the grayscale value of the background area according to the target grayscale value, so that the halo contrast of the display interface is less than or equal to the target contrast.
[0118] The interface display device 500 provided in this application embodiment acquires a grayscale-contrast curve of the display interface when the halo contrast of the display interface is greater than the target contrast. The display interface includes a background area and a main area, and the brightness of the background area is less than the brightness of the main area. The grayscale-contrast curve is used to indicate the correspondence between the grayscale value of the background area and the halo contrast of the display interface when only the grayscale value of the background area is increased. Based on the grayscale-contrast curve and the target contrast, a target grayscale value is determined. Based on the target grayscale value, the grayscale value of the background area is increased so that the halo contrast of the display interface is less than or equal to the target contrast. Through the above-described interface display device 500, when the halo contrast of the display interface is greater than the target contrast, a preset grayscale-contrast curve is acquired. Based on the correspondence between the grayscale value of the background area and the halo contrast of the display interface when only the grayscale value of the background area is increased, as indicated by the grayscale-contrast curve, a target grayscale value is determined. Then, based on the target grayscale value, the grayscale value of the background area with lower brightness in the display interface is adjusted so that the halo contrast of the display interface is less than or equal to the target contrast. In this way, for display interfaces with high halo contrast, based on the preset grayscale-contrast curve, the grayscale value of the low-brightness background area is increased, thereby reducing the halo contrast of the display interface. This can effectively reduce the halo in the display interface, improve the halo processing effect in the display interface, and thus improve the interface display effect.
[0119] In this embodiment of the application, the processing unit 504 is specifically used to: increase the grayscale value of a first region in the background region to a target grayscale value, wherein the first region is a region in the background region whose distance from the region boundary is less than or equal to a first distance, and the region boundary is the boundary between the background region and the main body region; increase the grayscale value of a second region in the background region, such that the grayscale value of the background region decreases in order of increasing distance from the region boundary, wherein the second region is a region in the background region whose distance from the region boundary is greater than the first distance.
[0120] The embodiments provided in this application increase the grayscale value of a first region in the background area to a target grayscale value. The first region is a region in the background area whose distance from the region boundary is less than or equal to a first distance, and the region boundary is the boundary between the background area and the main body area. The grayscale value of a second region in the background area is also increased, such that the grayscale values of the background area decrease in order of increasing distance from the region boundary. The second region is a region in the background area whose distance from the region boundary is greater than the first distance. In this way, while ensuring the halo effect, the impact of grayscale adjustment on the background design is reduced.
[0121] In this embodiment of the application, the processing unit 504 is specifically used to: increase the grayscale value of the green light channel of the background area to the target grayscale value; and, if the halo contrast of the display interface is still greater than the target contrast, further increase the grayscale value of the red light channel and / or blue light channel of the background area to the target grayscale value.
[0122] The embodiments provided in this application increase the grayscale value of the green light channel in the background area to the target grayscale value; if the halo contrast of the display interface is still greater than the target contrast, the grayscale values of the red light channel and / or blue light channel in the background area are then increased to the target grayscale value. This reduces the limitations on UI design while ensuring the halo processing effect.
[0123] In this embodiment, the halo contrast is related to the ratio of the grayscale brightness of the main area and the background area, and also to the intensity ratio of the third area in the background area. The grayscale brightness is used to indicate the brightness value corresponding to the grayscale value. The third area is the area in the background area whose distance from the area boundary is less than or equal to the second distance. The intensity ratio is the brightness ratio of the third area to the main area. In the grayscale-contrast curve, the grayscale value of the background area is inversely proportional to the halo contrast of the display interface.
[0124] In the embodiments provided in this application, the halo contrast is related to the ratio of the grayscale brightness of the main area and the background area, and also to the intensity ratio of a third region within the background area. Grayscale brightness indicates the brightness value corresponding to the grayscale value. The third region is the area in the background area whose distance from the region boundary is less than or equal to a second distance. The intensity ratio is the ratio of the brightness of the third region to that of the main area. In the grayscale-contrast curve, the grayscale value of the background area is inversely proportional to the halo contrast of the display interface. Thus, based on the grayscale-contrast curve, the halo intensity can be quantified, balancing the background brightness and halo intensity, thereby improving the halo processing effect.
[0125] In this embodiment of the application, the processing unit 504 is further configured to: reduce the grayscale value of the main area when the halo contrast of the display interface is greater than the target contrast; and / or, reduce the display area of the main area when the halo contrast of the display interface is greater than the target contrast.
[0126] The embodiments provided in this application reduce the grayscale value of the main area when the halo contrast of the display interface is greater than the target contrast; and / or reduce the display area of the main area when the halo contrast of the display interface is greater than the target contrast. In this way, improving the halo problem by adjusting the main area can be combined with increasing the grayscale value of the background area to enhance the halo processing effect.
[0127] In the embodiments of this application, the target contrast ratio is ≤20.
[0128] In the embodiments provided in this application, the target contrast ratio is ≤20. Therefore, adjusting the halo contrast of the display interface based on the target contrast ratio can effectively improve the halo problem in the display interface and enhance the display effect.
[0129] In the embodiments of this application, the target contrast is ≤1.5.
[0130] In the embodiments provided in this application, the target contrast ratio is ≤1.5. Therefore, by adjusting the halo contrast of the display interface based on the target contrast ratio, halo problems in the display interface can be effectively eliminated, improving the interface display effect.
[0131] The interface display device 500 in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the specific type of device.
[0132] The interface display device 500 in this embodiment can be a device with an operating system. The operating system can be Android, iOS, or other possible operating systems; this embodiment does not specifically limit the specific operating system.
[0133] The interface display device 500 provided in this application embodiment can achieve... Figure 1 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.
[0134] Optionally, such as Figure 8As shown, this application embodiment also provides an electronic device 600, including a processor 602 and a memory 604. The memory 604 stores a program or instructions that can run on the processor 602. When the program or instructions are executed by the processor 602, they implement the various steps of the above-described interface display method embodiment and can achieve the same technical effect. To avoid repetition, they will not be described again here.
[0135] It should be noted that the electronic devices in the embodiments of this application include the aforementioned mobile electronic devices and non-mobile electronic devices.
[0136] Figure 9 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of this application.
[0137] Electronic device 700 includes, but is not limited to: radio frequency unit 701, network module 702, audio output unit 703, input unit 704, sensor 705, display unit 706, user input unit 707, interface unit 708, memory 709, and processor 710, etc.
[0138] Those skilled in the art will understand that the electronic device 700 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 710 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 9 The electronic device structure shown does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.
[0139] The processor 710 is used to obtain the grayscale-contrast curve of the display interface when the halo contrast of the display interface is greater than the target contrast. The display interface includes a background area and a main area. The brightness of the background area is less than the brightness of the main area. The grayscale-contrast curve is used to indicate the correspondence between the grayscale value of the background area and the halo contrast of the display interface when only the grayscale value of the background area is increased.
[0140] The processor 710 is also used to determine the target grayscale value based on the grayscale-contrast curve and the target contrast.
[0141] The processor 710 is also used to increase the grayscale value of the background area according to the target grayscale value, so that the halo contrast of the display interface is less than or equal to the target contrast.
[0142] In this embodiment, when the halo contrast of the display interface is greater than the target contrast, a grayscale-contrast curve of the display interface is obtained. The display interface includes a background area and a main area, and the brightness of the background area is less than the brightness of the main area. The grayscale-contrast curve is used to indicate the correspondence between the grayscale value of the background area and the halo contrast of the display interface when only the grayscale value of the background area is increased. Based on the grayscale-contrast curve and the target contrast, a target grayscale value is determined. Based on the target grayscale value, the grayscale value of the background area is increased so that the halo contrast of the display interface is less than or equal to the target contrast. In this embodiment, when the halo contrast of the display interface is greater than the target contrast, a preset grayscale-contrast curve is obtained. Based on the correspondence between the grayscale value of the background area and the halo contrast of the display interface when only the grayscale value of the background area is increased, as indicated by the grayscale-contrast curve, a target grayscale value is determined. Then, based on the target grayscale value, the grayscale value of the background area with lower brightness in the display interface is adjusted so that the halo contrast of the display interface is less than or equal to the target contrast. In this way, for display interfaces with high halo contrast, based on the preset grayscale-contrast curve, the grayscale value of the low-brightness background area is increased, thereby reducing the halo contrast of the display interface. This can effectively reduce the halo in the display interface, improve the halo processing effect in the display interface, and thus improve the interface display effect.
[0143] Optionally, the processor 710 is specifically used to: increase the grayscale value of a first region in the background region to a target grayscale value, wherein the first region is a region in the background region whose distance from the region boundary is less than or equal to a first distance, and the region boundary is the boundary between the background region and the main body region; increase the grayscale value of a second region in the background region, such that the grayscale values of the background region decrease in order of increasing distance from the region boundary, wherein the second region is a region in the background region whose distance from the region boundary is greater than the first distance.
[0144] The embodiments provided in this application increase the grayscale value of a first region in the background area to a target grayscale value. The first region is a region in the background area whose distance from the region boundary is less than or equal to a first distance, and the region boundary is the boundary between the background area and the main body area. The grayscale value of a second region in the background area is also increased, such that the grayscale values of the background area decrease in order of increasing distance from the region boundary. The second region is a region in the background area whose distance from the region boundary is greater than the first distance. In this way, while ensuring the halo effect, the impact of grayscale adjustment on the background design is reduced.
[0145] Optionally, the processor 710 is specifically used to: increase the grayscale value of the green light channel of the background area to the target grayscale value; and, if the halo contrast of the display interface is still greater than the target contrast, further increase the grayscale value of the red light channel and / or blue light channel of the background area to the target grayscale value.
[0146] The embodiments provided in this application increase the grayscale value of the green light channel in the background area to the target grayscale value; if the halo contrast of the display interface is still greater than the target contrast, the grayscale values of the red light channel and / or blue light channel in the background area are then increased to the target grayscale value. This reduces the limitations on UI design while ensuring the halo processing effect.
[0147] Optionally, the halo contrast is related to the ratio of the grayscale brightness of the main area and the background area, and also to the intensity ratio of a third area in the background area. The grayscale brightness is used to indicate the brightness value corresponding to the grayscale value. The third area is the area in the background area whose distance from the area boundary is less than or equal to the second distance. The intensity ratio is the brightness ratio of the third area to the main area. In the grayscale-contrast curve, the grayscale value of the background area is inversely proportional to the halo contrast of the display interface.
[0148] In the embodiments provided in this application, the halo contrast is related to the ratio of the grayscale brightness of the main area and the background area, and also to the intensity ratio of a third region within the background area. Grayscale brightness indicates the brightness value corresponding to the grayscale value. The third region is the area in the background area whose distance from the region boundary is less than or equal to a second distance. The intensity ratio is the ratio of the brightness of the third region to that of the main area. In the grayscale-contrast curve, the grayscale value of the background area is inversely proportional to the halo contrast of the display interface. Thus, based on the grayscale-contrast curve, the halo intensity can be quantified, balancing the background brightness and halo intensity, thereby improving the halo processing effect.
[0149] Optionally, the processor 710 is also configured to: reduce the grayscale value of the main area when the halo contrast of the display interface is greater than the target contrast; and / or, reduce the display area of the main area when the halo contrast of the display interface is greater than the target contrast.
[0150] The embodiments provided in this application reduce the grayscale value of the main area when the halo contrast of the display interface is greater than the target contrast; and / or reduce the display area of the main area when the halo contrast of the display interface is greater than the target contrast. In this way, improving the halo problem by adjusting the main area can be combined with increasing the grayscale value of the background area to enhance the halo processing effect.
[0151] Optionally, the target contrast ratio is ≤20.
[0152] In the embodiments provided in this application, the target contrast ratio is ≤20. Therefore, adjusting the halo contrast of the display interface based on the target contrast ratio can effectively improve the halo problem in the display interface and enhance the display effect.
[0153] Optionally, the target contrast ratio is ≤1.5.
[0154] In the embodiments provided in this application, the target contrast ratio is ≤1.5. Therefore, by adjusting the halo contrast of the display interface based on the target contrast ratio, halo problems in the display interface can be effectively eliminated, improving the interface display effect.
[0155] It should be understood that, in this embodiment, the input unit 704 may include a graphics processing unit (GPU) 7041 and a microphone 7042. The GPU 7041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 706 may include a display panel 7061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 707 includes at least one of a touch panel 7071 and other input devices 7072. The touch panel 7071 is also called a touch screen. The touch panel 7071 may include a touch detection device and a touch controller. Other input devices 7072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be described in detail here.
[0156] The memory 709 can be used to store software programs and various data. The memory 709 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 709 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 709 in the embodiments of this application includes, but is not limited to, these and any other suitable types of memory.
[0157] Processor 710 may include one or more processing units; optionally, processor 710 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 710.
[0158] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described interface display method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.
[0159] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0160] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface and the processor are coupled. The processor is used to run programs or instructions to implement the various processes of the above-described interface display method embodiment and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0161] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0162] This application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the interface display method embodiment described above, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0163] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0164] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.
[0165] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A method for displaying an interface, characterized in that, include: When the halo contrast of the display interface is greater than the target contrast, the grayscale-contrast curve of the display interface is obtained. The display interface includes a background area and a main area. The brightness of the background area is less than the brightness of the main area. The grayscale-contrast curve is used to indicate the correspondence between the grayscale value of the background area and the halo contrast of the display interface when only the grayscale value of the background area is increased. The target grayscale value is determined based on the grayscale-contrast curve and the target contrast. Based on the target grayscale value, the grayscale value of the background area is increased so that the halo contrast of the display interface is less than or equal to the target contrast.
2. The interface display method according to claim 1, characterized in that, The step of increasing the grayscale value of the background region based on the target grayscale value includes: The grayscale value of the first region in the background region is increased to the target grayscale value. The first region is the region in the background region whose distance from the region boundary is less than or equal to a first distance. The region boundary is the boundary between the background region and the main body region. Increase the grayscale value of the second region in the background region, so that the grayscale values of the background region decrease in order of increasing distance from the region boundary, wherein the second region is the region in the background region whose distance from the region boundary is greater than the first distance.
3. The interface display method according to claim 1, characterized in that, The step of increasing the grayscale value of the background region based on the target grayscale value includes: Increase the grayscale value of the green light channel in the background area to the target grayscale value; If the halo contrast of the display interface is still greater than the target contrast, the grayscale value of the red light channel and / or blue light channel of the background area is then increased to the target grayscale value.
4. The interface display method according to any one of claims 1 to 3, characterized in that, The halo contrast is related to the ratio of the grayscale brightness of the main area and the background area, and is also related to the intensity ratio of the third area in the background area. The grayscale brightness is used to indicate the brightness value corresponding to the grayscale value. The third area is the area in the background area whose distance from the area boundary is less than or equal to a second distance. The intensity ratio is the brightness ratio of the third area to the main area. In the grayscale-contrast curve, the grayscale value of the background area is inversely proportional to the halo contrast of the display interface.
5. The interface display method according to any one of claims 1 to 3, characterized in that, Also includes: If the halo contrast of the display interface is greater than the target contrast, reduce the grayscale value of the main area; And / or, If the halo contrast of the display interface is greater than the target contrast, the display area of the main body region is reduced.
6. The interface display method according to any one of claims 1 to 3, characterized in that, The target contrast ratio is ≤20.
7. The interface display method according to any one of claims 1 to 3, characterized in that, The target contrast ratio is ≤1.
5.
8. An interface display device, characterized in that, include: The acquisition unit is used to acquire the grayscale-contrast curve of the display interface when the halo contrast of the display interface is greater than the target contrast. The display interface includes a background area and a main area. The brightness of the background area is less than the brightness of the main area. The grayscale-contrast curve is used to indicate the correspondence between the grayscale value of the background area and the halo contrast of the display interface when only the grayscale value of the background area is increased. The processing unit is configured to determine the target grayscale value based on the grayscale-contrast curve and the target contrast. The processing unit is further configured to increase the grayscale value of the background area according to the target grayscale value, so that the halo contrast of the display interface is less than or equal to the target contrast.
9. The interface display device according to claim 8, characterized in that, The processing unit is specifically used for: The grayscale value of the first region in the background region is increased to the target grayscale value. The first region is the region in the background region whose distance from the region boundary is less than or equal to a first distance. The region boundary is the boundary between the background region and the main body region. Increase the grayscale value of the second region in the background region, so that the grayscale values of the background region decrease in order of increasing distance from the region boundary, wherein the second region is the region in the background region whose distance from the region boundary is greater than the first distance.
10. An electronic device, characterized in that, It includes a processor and a memory, the memory storing a program or instructions that can run on the processor, the program or instructions being executed by the processor to implement the steps of the interface display method as described in any one of claims 1 to 7.