Display control method, device and storage medium
By detecting the lighting intensity of the terminal equipment environment and performing brightness conversion in the HSV color space, the problem of excessive brightness in dark mode is solved, and the comfort and flexibility of the display interface are improved.
Patent Information
- Application Number
- CN202210088879.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-25
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2042-01-25
AI Technical Summary
In dark light environments, the dark mode of the terminal device may cause text or pictures to be too bright, causing pressure on the user's eyes and affecting the user experience.
By detecting the lighting intensity of the current environment of the terminal device, determining the conversion parameters according to the preset correspondence relationship, converting the brightness of the display screen in the HSV color space, obtaining a target screen adapted to the current environment, and drawing it on the display interface.
Improves the flexibility of display adjustment and the comfort of the display interface, avoiding eye pressure caused by excessive brightness in dark environments.
Smart Images

Figure CN114449242B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of terminal devices, and in particular, to a display control method, apparatus, and storage medium. Background Art
[0002] With the rapid development of society, the display mode of terminal devices has become more and more intelligent. Usually, terminal devices are provided with a dark mode to provide better visibility for users, so that users can comfortably use terminal devices in a low-light environment. In related technologies, the dark mode usually darkens the background, but this may cause text or pictures to be too bright in a low-light environment, putting pressure on the user's eyes and affecting the normal use of the user. Summary of the Invention
[0003] To overcome the problems existing in related technologies, the present disclosure provides a display control method, apparatus, and storage medium.
[0004] According to a first aspect of an embodiment of the present disclosure, a display control method is provided. The method includes:
[0005] When a specified display mode is enabled on a terminal device, detecting the light intensity of the environment where the terminal device is currently located;
[0006] Determining a conversion parameter corresponding to the light intensity according to a preset correspondence;
[0007] Converting the lightness of a to-be-displayed picture in the HSV color space according to the conversion parameter to obtain a target picture corresponding to the specified display mode, and drawing the target picture on a display interface of the terminal device.
[0008] Optionally, the converting the lightness of the to-be-displayed picture in the HSV color space according to the conversion parameter to obtain the target picture corresponding to the specified display mode includes:
[0009] Converting the to-be-displayed picture from the RGB color space to the HSV color space to obtain a first intermediate picture;
[0010] Converting the V color channel of the first intermediate picture according to the conversion parameter to obtain a second intermediate picture;
[0011] Converting the second intermediate picture from the HSV color space to the RGB color space to obtain the target picture.
[0012] Optionally, the conversion parameter includes: a first conversion parameter and a second conversion parameter; the converting the V color channel of the first intermediate picture according to the conversion parameter to obtain the second intermediate picture includes:
[0013] Invert the value of the first intermediate image on the V color channel;
[0014] Multiply the inverted result by the first conversion parameter, and use the sum of the multiplication result and the second conversion parameter as the value of the second intermediate image on the V color channel.
[0015] Optionally, determining the conversion parameter corresponding to the illumination intensity according to a preset correspondence includes:
[0016] Determine the current intensity range to which the illumination intensity belongs among multiple intensity ranges;
[0017] Determine the duration for which the illumination intensity remains within the current intensity range;
[0018] If the duration is greater than or equal to a specified duration threshold, determine the conversion parameter according to the correspondence and the current intensity range.
[0019] Optionally, determining the conversion parameter corresponding to the illumination intensity according to a preset correspondence includes:
[0020] Determine the current intensity range to which the illumination intensity belongs among multiple intensity ranges, and the historical intensity range to which the historical illumination intensity belongs, where the historical illumination intensity is the illumination intensity of the environment where the terminal device was previously located;
[0021] If the current intensity range is different from the historical intensity range, and the illumination intensity does not belong to the protection range of the current intensity range, determine the conversion parameter according to the correspondence and the current intensity range;
[0022] If the current intensity range is different from the historical intensity range, and the illumination intensity belongs to the protection range of the current intensity range, determine the conversion parameter according to the correspondence and the historical intensity range.
[0023] Optionally, determining the conversion parameter corresponding to the illumination intensity according to a preset correspondence includes:
[0024] Determine the current intensity range to which the illumination intensity belongs among multiple intensity ranges, and the historical intensity range to which the historical illumination intensity belongs, where the historical illumination intensity is the illumination intensity of the environment where the terminal device was previously located;
[0025] Determine the current conversion parameter according to the correspondence and the current intensity range, and determine the historical conversion parameter according to the correspondence and the historical intensity range;
[0026] Determine multiple conversion parameters arranged in sequence between the historical conversion parameter and the current conversion parameter according to a preset rule;
[0027] Converting the lightness of the picture to be displayed in the HSV color space according to the conversion parameter to obtain the target picture corresponding to the specified display mode, and drawing the target picture on the display interface of the terminal device includes:
[0028] Converting the lightness of the picture to be displayed in the HSV color space according to each conversion parameter in sequence to obtain the target picture, and drawing the target picture on the display interface.
[0029] Optionally, converting the lightness of the picture to be displayed in the HSV color space according to the conversion parameter to obtain the target picture corresponding to the specified display mode includes:
[0030] Determining the value of the text part in the picture to be displayed in the RGB color space;
[0031] If the values of the text part on the R color channel, the G color channel, and the B color channel are all less than a preset threshold, adjusting the text part according to the minimum value of the text part on the R color channel, the G color channel, and the B color channel to obtain the adjusted picture to be displayed;
[0032] Converting the lightness of the adjusted picture to be displayed in the HSV color space according to the conversion parameter to obtain the target picture.
[0033] Optionally, determining the conversion parameter corresponding to the light intensity according to the preset corresponding relationship includes:
[0034] Determining the conversion parameter and the picture mask layer corresponding to the light intensity according to the corresponding relationship;
[0035] Converting the lightness of the picture to be displayed in the HSV color space according to the conversion parameter to obtain the target picture corresponding to the specified display mode, and drawing the target picture on the display interface of the terminal device includes:
[0036] Determining the picture part and other parts in the picture to be displayed;
[0037] Processing the picture part according to the picture mask layer, and converting the lightness of the other parts according to the conversion parameter to obtain the target picture;
[0038] Drawing the target picture on the display interface.
[0039] According to the second aspect of the embodiments of the present disclosure, a display control device is provided, and the device includes:
[0040] A detection module, configured to detect the light intensity of the environment where the terminal device is currently located when the terminal device turns on a specified display mode;
[0041] A determination module, configured to determine a conversion parameter corresponding to the light intensity according to a preset correspondence;
[0042] A conversion module, configured to convert the brightness of the picture to be displayed in the HSV color space according to the conversion parameter to obtain a target picture corresponding to the specified display mode, and draw the target picture on the display interface of the terminal device.
[0043] Optionally, the conversion module includes:
[0044] A first conversion sub-module, configured to convert the picture to be displayed from the RGB color space to the HSV color space to obtain a first intermediate picture;
[0045] A second conversion sub-module, configured to convert the V color channel of the first intermediate picture according to the conversion parameter to obtain a second intermediate picture;
[0046] A third conversion sub-module, configured to convert the second intermediate picture from the HSV color space to the RGB color space to obtain the target picture.
[0047] Optionally, the conversion parameter includes: a first conversion parameter and a second conversion parameter; the second conversion sub-module is configured to:
[0048] Invert the value of the first intermediate picture on the V color channel;
[0049] Multiply the inverted result by the first conversion parameter, and use the sum of the multiplication result and the second conversion parameter as the value of the second intermediate picture on the V color channel.
[0050] Optionally, the determination module includes:
[0051] A first determination sub-module, configured to determine the current intensity interval to which the light intensity belongs among multiple intensity intervals;
[0052] A second determination sub-module, configured to determine the duration for which the light intensity remains in the current intensity interval;
[0053] A third determination sub-module, configured to, if the duration is greater than or equal to a specified duration threshold, determine the conversion parameter according to the correspondence and the current intensity interval.
[0054] Optionally, the determination module is configured to:
[0055] In multiple intensity ranges, determine the current intensity range to which the light intensity belongs and the historical intensity range to which the historical light intensity belongs, where the historical light intensity is the light intensity of the environment where the terminal device was previously located;
[0056] If the current intensity range is different from the historical intensity range and the light intensity does not belong to the protection range of the current intensity range, determine the conversion parameter according to the corresponding relationship and the current intensity range;
[0057] If the current intensity range is different from the historical intensity range and the light intensity belongs to the protection range of the current intensity range, determine the conversion parameter according to the corresponding relationship and the historical intensity range.
[0058] Optionally, the determining module is configured to:
[0059] In multiple intensity ranges, determine the current intensity range to which the light intensity belongs and the historical intensity range to which the historical light intensity belongs, where the historical light intensity is the light intensity of the environment where the terminal device was previously located;
[0060] Determine the current conversion parameter according to the corresponding relationship and the current intensity range, and determine the historical conversion parameter according to the corresponding relationship and the historical intensity range;
[0061] Determine a plurality of conversion parameters arranged in sequence from the historical conversion parameter to the current conversion parameter according to a preset rule;
[0062] The conversion module is configured to:
[0063] Successively convert the lightness of the picture to be displayed in the HSV color space according to each conversion parameter to obtain the target picture, and draw the target picture on the display interface.
[0064] Optionally, the conversion module is configured to:
[0065] Determine the value of the text part in the picture to be displayed in the RGB color space;
[0066] If the values of the text part on the R color channel, the G color channel, and the B color channel are all less than a preset threshold, adjust the text part according to the minimum value of the text part on the R color channel, the G color channel, and the B color channel to obtain the adjusted picture to be displayed;
[0067] Convert the lightness of the adjusted picture to be displayed in the HSV color space according to the conversion parameter to obtain the target picture.
[0068] Optionally, the determining module is configured to:
[0069] Determine the conversion parameter and the picture mask layer corresponding to the illumination intensity according to the corresponding relationship;
[0070] The conversion module includes:
[0071] A determining sub-module, configured to determine a picture part and other parts in the picture to be displayed;
[0072] A processing sub-module, configured to process the picture part according to the picture mask layer, and convert the brightness of the other parts according to the conversion parameter to obtain the target picture;
[0073] A drawing sub-module, configured to draw the target picture on the display interface.
[0074] According to a third aspect of the embodiments of the present disclosure, a display control device is provided, including:
[0075] A processor;
[0076] A memory for storing instructions executable by the processor;
[0077] Wherein, the processor is configured to:
[0078] A detection module, configured to detect the illumination intensity of the environment where the terminal device is currently located when the terminal device turns on a specified display mode;
[0079] A determining module, configured to determine a conversion parameter corresponding to the illumination intensity according to a preset corresponding relationship;
[0080] A conversion module, configured to convert the brightness of the picture to be displayed in the HSV color space according to the conversion parameter to obtain a target picture corresponding to the specified display mode, and draw the target picture on the display interface of the terminal device.
[0081] According to a fourth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored, and when the program instructions are executed by a processor, the steps of the display control method provided in the first aspect of the present disclosure are implemented.
[0082] The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects:
[0083] When the terminal device enables a specified display mode, the present disclosure first detects the light intensity of the environment where the terminal device is currently located, obtains the conversion parameter corresponding to the light intensity according to a preset correspondence, and then converts the brightness of the picture to be displayed according to the conversion parameter, so as to obtain the target picture corresponding to the specified display mode, and draw the target picture on the display interface of the terminal device. By converting the brightness of the picture to be displayed according to the light intensity of the environment where the terminal device is currently located, the present disclosure obtains a target picture that adapts to the current environment in the specified display mode, which can improve the flexibility of display adjustment and the comfort of the display interface.
[0084] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0085] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure.
[0086] Figure 1 is a flowchart of a display control method shown according to an exemplary embodiment;
[0087] Figure 2 is a flowchart of another display control method shown according to an exemplary embodiment;
[0088] Figure 3 is a flowchart of another display control method shown according to an exemplary embodiment;
[0089] Figure 4 is a flowchart of another display control method shown according to an exemplary embodiment;
[0090] Figure 5 is a flowchart of another display control method shown according to an exemplary embodiment;
[0091] Figure 6 is a flowchart of another display control method shown according to an exemplary embodiment;
[0092] Figure 7 is a flowchart of another display control method shown according to an exemplary embodiment;
[0093] Figure 8 is a block diagram of a display control device shown according to an exemplary embodiment;
[0094] Figure 9 is a block diagram of another display control device shown according to an exemplary embodiment;
[0095] Figure 10It is a block diagram of another display control device shown according to an exemplary embodiment;
[0096] Figure 11 It is a block diagram of another display control device shown according to an exemplary embodiment;
[0097] Figure 12 It is a block diagram of a device shown according to an exemplary embodiment. Detailed implementation manners
[0098] Here, the exemplary embodiments will be described in detail, and examples thereof are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the present disclosure. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0099] Currently, the dark mode of a terminal device is usually achieved by inverting the L color channel in the Lab color space. For example, black text is inverted into white text, or a white background is inverted into a black background. And there is usually only one display mode in the dark mode, and it cannot be adaptively adjusted according to the ambient light intensity. However, the present disclosure can convert the brightness of the display screen according to the light intensity of the environment where the terminal device is currently located, so as to obtain a target screen suitable for the current environment in a specified display mode, which can improve the flexibility of display adjustment and the comfort of the display interface.
[0100] Figure 1 It is a flowchart of a display control method shown according to an exemplary embodiment. As Figure 1 shown, the method may include the following steps:
[0101] In step S101, when the terminal device turns on a specified display mode, detect the light intensity of the environment where the terminal device is currently located.
[0102] For example, the execution subject of the present disclosure may be a terminal device. Among them, the terminal device may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Tablet Computers), PMPs (Portable Multimedia Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. First, it is possible to detect whether the terminal device has enabled a specified mode, where the specified mode may be, for example, the dark mode. If it is detected that the terminal device has enabled the specified display mode, then the light intensity of the environment where the terminal device is currently located can be directly detected through the photosensitive component provided on the terminal device, or the light intensity of the environment where the terminal device is currently located can be indirectly obtained based on the screen backlight brightness of the terminal device. The present disclosure does not make specific limitations on this.
[0103] In step S102, according to the preset corresponding relationship, determine the conversion parameter corresponding to the light intensity.
[0104] Exemplarily, the corresponding relationship between the light intensity and the conversion parameter can be preset. After obtaining the light intensity of the environment where the terminal device is currently located, the conversion parameter corresponding to the light intensity can be obtained according to the preset corresponding relationship. It should be noted that the corresponding relationship can be a corresponding relationship table established in advance between the intensity interval and the conversion parameter. For example, it can be as shown in Table 1, where DBV is used to indicate the screen backlight brightness of the terminal device, and K and B are conversion parameters. After detecting the light intensity, it is possible to first determine the intensity interval to which the light intensity belongs, and then look up the conversion parameter corresponding to the intensity interval to which the light intensity belongs in the corresponding relationship table. The corresponding relationship can also be a corresponding relationship function established in advance between the light intensity and the conversion parameter. After detecting the light intensity, the light intensity can be substituted into the corresponding relationship function to obtain the conversion parameter corresponding to the light intensity. The corresponding relationship can also be a corresponding relationship model trained in advance between the light intensity and the conversion parameter. After detecting the light intensity, the light intensity can be used as the input of the corresponding relationship model, and the conversion parameter corresponding to the light intensity is output.
[0105] Strength range Illumination intensity (lux) DBV K B 1 0-5 0-160 0.7059 0 2 5-25 160-600 0.5882 0.1961 3 25-800 600-1200 0.6471 0.2549 4 800-2000 1200-2400 0.6275 0.3137 5 2000+ 2400-8191 0.6863 0.3137
[0106] Table 1
[0107] In step S103, according to the conversion parameter, convert the value of the picture to be displayed in the HSV (English: Hue, Saturation, Value; Chinese: Hue, Saturation, Brightness) color space to obtain the target picture corresponding to the specified display mode, and draw the target picture on the display interface of the terminal device.
[0108] Exemplarily, after obtaining the conversion parameter corresponding to the light intensity, the lightness of the picture to be displayed can be converted in the HSV color space according to the conversion parameter, so as to obtain the target picture corresponding to the specified display mode. The picture to be displayed can be understood as the picture that the terminal device currently needs to display. Specifically, the lightness of the picture to be displayed can be reduced by converting the V color channel of the picture to be displayed in the HSV color space according to the conversion parameter, or the gray level of the picture to be displayed can be directly changed according to the conversion parameter to reduce the lightness of the picture to be displayed. The present disclosure does not make specific limitations on this. After that, the target picture can be drawn on the display interface of the terminal device. Specifically, the target picture can be drawn by means of hardware acceleration drawing or software drawing. The target picture can include multiple layers, and each layer can correspond to different controls. Correspondingly, the corresponding layers can be drawn on the display interface of the terminal device through the controls corresponding to each layer to display the target picture on the display interface.
[0109] In this way, when the terminal device is in the specified display mode, the lightness of the picture displayed on the display interface can be changed according to the light intensity of the environment where the terminal device is located, which can improve the flexibility of display adjustment and the comfort of the display interface.
[0110] In summary, the present disclosure first detects the light intensity of the environment where the terminal device is currently located when the terminal device enables the specified display mode, and obtains the conversion parameter corresponding to the light intensity according to the preset corresponding relationship. After that, the lightness of the picture to be displayed is converted according to the conversion parameter, so as to obtain the target picture corresponding to the specified display mode, and the target picture is drawn on the display interface of the terminal device. The present disclosure converts the lightness of the picture to be displayed according to the light intensity of the environment where the terminal device is currently located, so as to obtain the target picture that adapts to the current environment in the specified display mode, which can improve the flexibility of display adjustment and the comfort of the display interface.
[0111] Figure 2 It is a flowchart of another display control method shown according to an exemplary embodiment. As Figure 2 shown, step S103 can be implemented through the following steps:
[0112] In step S1031, the picture to be displayed is converted from the RGB color space to the HSV color space to obtain the first intermediate picture.
[0113] In step S1032, the V color channel of the first intermediate picture is converted according to the conversion parameter to obtain the second intermediate picture.
[0114] In step S1033, the second intermediate picture is converted from the HSV color space to the RGB color space to obtain the target picture.
[0115] Exemplarily, usually, the terminal device uses the RGB (English: Red, Green, Blue; Chinese: Red, Green, Blue) color space. In order to directly adjust the brightness of the picture to be displayed, after obtaining the conversion parameters, the picture to be displayed can be converted from the RGB color space to the HSV color space to obtain a first intermediate picture. Then, the V color channel of the first intermediate picture can be converted according to the conversion parameters to change the brightness of the first intermediate picture to obtain a second intermediate picture. Finally, the second intermediate picture is converted from the HSV color space back to the RGB color space to obtain the target picture.
[0116] In an application scenario, the conversion parameters include: a first conversion parameter and a second conversion parameter. One implementation of step S1032 can be:
[0117] Invert the value of the first intermediate picture on the V color channel.
[0118] Multiply the inversion result by the first conversion parameter, and use the sum of the multiplication result and the second conversion parameter as the value of the second intermediate picture on the V color channel.
[0119] Exemplarily, the conversion parameters can include: a first conversion parameter and a second conversion parameter. After converting the picture to be displayed from the RGB color space to the HSV color space, the value of the first intermediate picture on the V color channel can be obtained, and the value of the first intermediate picture on the V color channel can be inverted to obtain an inversion result. Then, the inversion result can be multiplied by the first conversion parameter, and the sum of the multiplication result and the second conversion parameter can be used as the value of the second intermediate picture on the V color channel. The above steps can be represented by formula 1, for example:
[0120] V′ = K(1 - V) + B (Formula 1)
[0121] Where, V′ is the value of the second intermediate picture on the V color channel, V is the value of the first intermediate picture on the V color channel, K is the first conversion parameter, and B is the second conversion parameter.
[0122] Specifically, taking the first conversion parameter K = 0.6, the second conversion parameter B = 0.2, and the value of the first intermediate picture on the V color channel V = 0.7 as an example, the value of the second intermediate picture on the V color channel V′ = 0.6*(1 - 0.7) + 0.2 = 0.38.
[0123] It should be noted that as shown in Table 2, the preset gray level of black in the specified display mode and the preset gray level of white in the specified display mode can be determined through experiments in each intensity interval, so that the contrast between black and white in the specified display mode is within the preset range, thus ensuring the comfort of the display interface. Among them, when the values of the R color channel, G color channel, and B color channel of a certain color in the RGB color space are equal and all are X, the gray level of this color is X. For example: the values of the R color channel, G color channel, and B color channel of white in the RGB color space are equal and all are 255, then the gray level of white is 255. Among them, the preset range of the contrast can be 7 - 12. For example: in the first intensity interval in Table 2, the preset gray level of white in the specified display mode is 0, and the preset gray level of black in the specified display mode is 180, then the contrast between black and white in the specified display mode in the first intensity interval can be obtained as 10, which is within the preset range. Another example: in the second intensity interval in Table 2, the preset gray level of white in the specified display mode is 50, and the preset gray level of black in the specified display mode is 200, then the contrast between black and white in the specified display mode in the second intensity interval can be obtained as 7.6, which is also within the preset range.
[0124] After that, for each intensity interval, the gray level of black in the normal mode can be converted to the HSV color space to obtain the value of the V color channel of black in the normal mode (i.e., the V value in Formula 1), and the preset gray level of black in the specified display mode can be converted to the HSV color space to obtain the value of the V color channel of black in the specified display mode (i.e., the V' value in Formula 1). And the gray level of white in the normal mode can be converted to the HSV color space to obtain the value of the V color channel of white in the normal mode (i.e., the V value in Formula 1), and the preset gray level of white in the specified display mode can be converted to the HSV color space to obtain the value of the V color channel of white in the specified display mode (i.e., the V' value in Formula 1). Further, the value of the V color channel of black in the normal mode and the value of the V color channel of black in the specified display mode can be substituted into Formula 1 to obtain Relationship 1. And the value of the V color channel of white in the normal mode and the value of the V color channel of white in the specified display mode can be substituted into Formula 1 to obtain Relationship 2. According to Relationship 1 and Relationship 2, the conversion parameters corresponding to this intensity interval can be obtained, that is, K and B in Formula 1.
[0125]
[0126] Table 2
[0127] Taking the first intensity range in Table 2 as an example, the gray level of black in the normal mode is 0. After converting to the HSV color space, the value of the corresponding V color channel is 0 (i.e., V = 0). As can be seen from Table 2, the gray level of black in the specified display mode is 180. After converting to the HSV color space, the value of the corresponding V color channel is 0.7059 (i.e., V' = 0.7059). Substituting the value of the V color channel of black in the normal mode (i.e., V = 0) and the value of the V color channel in the specified display mode (i.e., V' = 0.7059) into Equation 1, we can get:
[0128] 0.7095 = K(1 - 0) + B (1)
[0129] The gray level of white in the normal mode is 255. After converting to the HSV color space, the value of the corresponding V color channel is 1 (i.e., V = 1). As can be seen from Table 2, the gray level of white in the specified display mode is 0. After converting to the HSV color space, the value of the corresponding V color channel is 0 (i.e., V' = 0). Substituting the value of the V color channel of white in the normal mode (i.e., V = 1) and the value of the V color channel in the specified display mode (i.e., V' = 0) into Equation 1, we can get:
[0130] 0 = K(1 - 1) + B (2)
[0131] According to Equation (1) and Equation (2), we can get: K = 0.7095, B = 0.
[0132] Figure 3 is a flowchart of another display control method shown according to an exemplary embodiment. As Figure 3 shown, step S102 can be implemented through the following steps:
[0133] In step S1021, in multiple intensity ranges, determine the current intensity range to which the light intensity belongs.
[0134] In step S1022, determine the duration for which the light intensity remains in the current intensity range.
[0135] In step S1023, if the duration is greater than or equal to the specified duration threshold, determine the conversion parameter according to the corresponding relationship and the current intensity range.
[0136] Exemplarily, the light intensity can be divided into multiple intensity intervals in advance. After detecting the light intensity of the environment where the terminal device is currently located, the current intensity interval to which the light intensity belongs can be determined among the multiple intensity intervals, and further, the duration for which the light intensity remains in the current intensity interval can be determined. If the duration is greater than or equal to the specified duration threshold, indicating that the light intensity is stable in the current intensity interval, then the conversion parameter can be determined according to the corresponding relationship and the current intensity interval. If the duration is less than the specified duration threshold, indicating that the light intensity is not stable, then the current conversion parameter can be kept unchanged. Among them, the specified duration threshold can be, for example, 2s.
[0137] Specifically, taking the intensity intervals including 0 - 800 lux and 800 - 2000 lux, the light intensity of 300 lux, and the specified duration threshold of 2s as an example, it can be determined that the current intensity interval is 0 - 800 lux. If the duration for which the light intensity remains within 0 - 800 lux is 3s, indicating that the light intensity is stable within 0 - 800 lux, then the conversion parameter can be determined according to the corresponding relationship and the current intensity interval. If the duration for which the light intensity remains within 0 - 800 lux is 1s, indicating that the light intensity has not yet stabilized within 0 - 800 lux, then the current conversion parameter can be kept unchanged.
[0138] Figure 4 is a flowchart of another display control method shown according to an exemplary embodiment, as Figure 4 shown, step S102 can also be implemented through the following steps:
[0139] In step S1024, among the multiple intensity intervals, determine the current intensity interval to which the light intensity belongs, and the historical intensity interval to which the historical light intensity belongs. The historical light intensity is the light intensity of the environment where the terminal device was previously located.
[0140] In step S1025, if the current intensity interval is different from the historical intensity interval, and the light intensity does not belong to the protection interval of the current intensity interval, determine the conversion parameter according to the corresponding relationship and the current intensity interval.
[0141] In step S1026, if the current intensity interval is different from the historical intensity interval, and the light intensity belongs to the protection interval of the current intensity interval, determine the conversion parameter according to the corresponding relationship and the historical intensity interval.
[0142] Exemplarily, the light intensity can be divided into multiple intensity intervals in advance, and a protection interval can be set in each intensity interval. Taking the intensity intervals including 0 - 800 lux and 800 - 2000 lux as an example, 700 - 800 lux can be set as the protection interval for 0 - 800 lux, and 800 - 1000 lux can be set as the protection interval for 800 - 2000 lux. After detecting the light intensity of the environment where the terminal device is currently located, in multiple intensity spaces, the current intensity interval to which the light intensity belongs and the historical intensity interval to which the historical light intensity belongs can be determined. Among them, the historical light intensity can be understood as the light intensity of the environment where the terminal device was previously located.
[0143] If the current intensity interval is different from the historical intensity interval, and the light intensity does not belong to the protection interval of the current intensity interval, it means that the light intensity is stable in the current intensity interval. Then, the conversion parameter can be determined according to the corresponding relationship and the current intensity interval. If the current intensity interval is different from the historical intensity interval, and the light intensity belongs to the protection interval of the current intensity interval, it means that the light intensity has not yet stabilized in the current intensity interval and may jump between the current intensity interval and the historical intensity interval. Then, the conversion parameter is determined according to the corresponding relationship and the historical intensity interval. In this way, by setting a protection interval in each intensity interval, the problem that the light intensity jumps at the boundary between intensity intervals, resulting in frequent switching of the brightness of the displayed screen, can be avoided, and the display stability can be improved.
[0144] Specifically, taking the intensity intervals including 0 - 800 lux and 800 - 2000 lux, 700 - 800 lux as the protection interval for 0 - 800 lux, 800 - 1000 lux as the protection interval for 800 - 2000 lux, and the historical light intensity being 1000 lux as an example, the historical intensity interval can be determined to be 800 - 2000 lux. If the light intensity is 500 lux, the current intensity interval can be determined to be 0 - 800 lux, which is different from the historical intensity interval, and the light intensity does not belong to the protection interval 700 - 800 lux of 0 - 800 lux. Then, the conversion parameter can be determined according to the corresponding relationship and the current intensity interval 0 - 800 lux. If the light intensity is 750 lux, the current intensity interval can be determined to be 0 - 800 lux, which is different from the historical intensity interval, and the light intensity belongs to the protection interval (700 - 800 lux) of 0 - 800 lux. Then, the conversion parameter can be determined according to the corresponding relationship and the historical intensity interval 800 - 2000 lux.
[0145] Figure 5 is a flowchart of another display control method shown according to an exemplary embodiment, as Figure 5 shown, step S102 can also be implemented through the following steps:
[0146] In step S1027, among multiple intensity ranges, determine the current intensity range to which the light intensity belongs and the historical intensity range to which the historical light intensity belongs, where the historical light intensity is the light intensity of the environment where the terminal device was previously located.
[0147] In step S1028, determine the current conversion parameter according to the correspondence relationship and the current intensity range, and determine the historical conversion parameter according to the correspondence relationship and the historical intensity range.
[0148] In step S1029, according to the preset rule, determine multiple conversion parameters arranged in sequence between the historical conversion parameter and the current conversion parameter.
[0149] Correspondingly, an implementation manner of step S103 can be:
[0150] Successively convert the lightness of the screen to be displayed in the HSV color space according to each conversion parameter to obtain the target screen, and draw the target screen on the display interface.
[0151] Exemplarily, after detecting the light intensity of the environment where the terminal device is currently located, it is possible to determine the current intensity range to which the light intensity belongs and the historical intensity range to which the historical light intensity belongs among multiple intensity ranges. Here, the historical light intensity can be understood as the light intensity of the environment where the terminal device was previously located. Then, the current conversion parameter can be determined according to the correspondence relationship and the current intensity range, and the historical conversion parameter can be determined according to the correspondence relationship and the historical intensity range. Among them, the current conversion parameter can include the first current conversion parameter and the second current conversion parameter, and the historical conversion parameter can include the first historical conversion parameter and the second historical conversion parameter.
[0152] Furthermore, it is possible to determine multiple conversion parameters arranged in sequence between the historical conversion parameter and the current conversion parameter according to the preset rule. Among them, each conversion parameter includes the first conversion parameter and the second conversion parameter. Specifically, the preset rule can extract multiple conversion parameters at a specified step value within the range from the historical conversion parameter to the current conversion parameter, where the specified step value can be, for example, 0.05. The preset rule can also be to extract a specified number of conversion parameters at equal intervals within the range from the historical conversion parameter to the current conversion parameter, where the specified number can be, for example, 29. Multiple conversion parameters can be obtained, for example, according to Formula 2 and Formula 3:
[0153]
[0154]
[0155] where, K n is the nth first conversion parameter, K N+1is the first current conversion parameter, K0 is the first historical conversion parameter, and N is the specified quantity. B n is the nth second conversion parameter, B N+1 is the second current conversion parameter, and B0 is the second historical conversion parameter.
[0156] Taking the specified quantity as 9, the first historical conversion parameter as 0.5, the second historical conversion parameter as 0.2, the first current conversion parameter as 0.6, and the second current conversion parameter as 0.1 as an example, the 3rd first conversion parameter is Correspondingly, the 3rd second conversion parameter is
[0157] Finally, the brightness of the picture to be displayed can be sequentially converted in the HSV color space according to each conversion parameter to obtain the target picture corresponding to each conversion parameter, and the target picture is drawn on the display interface. Specifically, the brightness of the picture to be displayed can be sequentially converted according to each conversion parameter at a preset frequency to obtain the target picture corresponding to each conversion parameter, and the target picture is drawn on the display interface. Among them, the preset frequency can be, for example, 1s, that is, the brightness of the picture to be displayed is adjusted once per second. It is also possible to sequentially convert the brightness of the picture to be displayed according to each conversion parameter at the same time interval within a specified duration according to a specified number of times to obtain the target picture corresponding to each conversion parameter, and the target picture is drawn on the display interface. Among them, the specified duration can be, for example, 30s, and the specified number of times can be, for example, 10 times, that is, within 30s, at a time interval of 3s, through 10 adjustments, the conversion of the brightness of the picture to be displayed corresponding to the historical conversion parameter to the picture to be displayed corresponding to the current conversion parameter is completed. The present disclosure does not make specific limitations on this. In this way, the brightness of the picture to be displayed is sequentially converted according to multiple conversion parameters, so that the brightness of the picture to be displayed gradually changes according to a certain gradient, and the transition of the brightness of the picture to be displayed can be realized more naturally, improving the comfort of the display interface.
[0158] Figure 6 is a flowchart of another display control method shown according to an exemplary embodiment, as Figure 6 shown, step S103 can also be implemented through the following steps:
[0159] In step S1034, determine the value of the text part in the picture to be displayed in the RGB color space.
[0160] In step S1035, if the values of the text part on the R color channel, the G color channel, and the B color channel are all less than the preset threshold, adjust the text part according to the minimum value of the text part on the R color channel, the G color channel, and the B color channel to obtain the adjusted picture to be displayed.
[0161] In step S1036, the brightness of the adjusted display screen to be displayed is converted in the HSV color space according to the conversion parameters to obtain the target screen.
[0162] Exemplarily, before converting the brightness of the display screen to be displayed according to the conversion parameters, the values of the text part in the display screen to be displayed in the RGB color space can be obtained first. If the values of the text part on the R color channel, the G color channel, and the B color channel are all less than the preset threshold, it means that the color of the text part is close to black but may not be black or gray. If the brightness of the text part is directly converted according to the values of the text part in the RGB color space, the converted text may become a color other than white or gray, affecting the user's reading. Among them, the preset threshold can be 50, for example. Therefore, the text part can be adjusted according to the minimum value of the text part on the R color channel, the G color channel, and the B color channel to obtain the adjusted display screen to be displayed. Then, the brightness of the adjusted display screen to be displayed is further converted according to the conversion parameters to obtain the target screen.
[0163] Specifically, the minimum value of the text part on the R color channel, the G color channel, and the B color channel can be determined first, and the values of the text part on the R color channel, the G color channel, and the B color channel are all adjusted to this minimum value. Taking the preset threshold as 50, the value of the text part on the R color channel as 23, the value on the G color channel as 27, and the value on the B color channel as 32 as an example, then the minimum value can be determined as 23, and the values of the text part on the R color channel, the G color channel, and the B color channel are all adjusted to 23. In this way, when the values of the text part on the R color channel, the G color channel, and the B color channel are all less than the preset threshold, the values of the text part on the R color channel, the G color channel, and the B color channel are first adjusted to the minimum value of the text part on the R color channel, the G color channel, and the B color channel, and then the brightness of the adjusted display screen to be displayed is converted according to the conversion parameters, which can ensure that the converted text is gray or white and will not show other colors, improving the accuracy of the conversion.
[0164] Figure 7 It is a flowchart of another display control method shown according to an exemplary embodiment. As Figure 7 shown, one implementation manner of step S102 can be:
[0165] According to the corresponding relationship, determine the conversion parameters and the picture mask layer corresponding to the light intensity.
[0166] Correspondingly, step S103 can be implemented in the following manner:
[0167] In step S1037, determine the picture part and other parts in the picture to be displayed.
[0168] In step S1038, process the picture part according to the picture mask layer, and convert the brightness of other parts according to the conversion parameters to obtain the target picture.
[0169] In step S1039, draw the target picture on the display interface.
[0170] Exemplarily, after detecting the light intensity of the environment where the terminal device is currently located, the conversion parameters and the picture mask layer corresponding to the light intensity can be determined according to the corresponding relationship. Among them, the picture mask layer can be understood as a pre-set mask layer that can reduce the brightness of the picture. It should be noted that the corresponding relationship can be a pre-established corresponding relationship table between the light intensity, the conversion parameters, and the picture mask layer, as shown in Table 3. After detecting the light intensity, the conversion parameters and the picture mask layer corresponding to the light intensity can be found in the corresponding relationship table. The corresponding relationship can also be a pre-trained corresponding relationship model between the light intensity, the conversion parameters, and the picture mask layer. After detecting the light intensity, the light intensity can be used as the input of the corresponding relationship model, and the conversion parameters and the picture mask layer corresponding to the light intensity can be output. The present disclosure does not make specific limitations on this.
[0171]
[0172] Table 3
[0173] Furthermore, the picture part and other parts in the picture to be displayed can be determined, and then the picture mask layer can be covered on the picture part to reduce the brightness of the picture part, and the brightness of other parts can be converted according to the conversion parameters, so as to obtain the target picture after processing the picture part and other parts respectively. Finally, draw the target picture on the display interface to make the brightness of the picture displayed on the display interface uniform, which can improve the comfort of the display interface.
[0174] In summary, the present disclosure first detects the light intensity of the environment where the terminal device is currently located when the terminal device turns on the specified display mode, and obtains the conversion parameters corresponding to the light intensity according to the preset corresponding relationship. Then, the brightness of the picture to be displayed is converted according to the conversion parameters, so as to obtain the target picture corresponding to the specified display mode, and the target picture is drawn on the display interface of the terminal device. The present disclosure converts the brightness of the picture to be displayed according to the light intensity of the environment where the terminal device is currently located, so as to obtain the target picture adapted to the current environment in the specified display mode, which can improve the flexibility of display adjustment and the comfort of the display interface.
[0175] Figure 8 is a block diagram of a display control device shown according to an exemplary embodiment, asFigure 8 As shown, the device 200 may include:
[0176] A detection module 201, configured to detect the light intensity of the environment where the terminal device is currently located when the terminal device turns on a specified display mode.
[0177] A determination module 202, configured to determine a conversion parameter corresponding to the light intensity according to a preset corresponding relationship.
[0178] A conversion module 203, configured to convert the lightness of the picture to be displayed in the HSV color space according to the conversion parameter, obtain a target picture corresponding to the specified display mode, and draw the target picture on the display interface of the terminal device.
[0179] Figure 9 It is a block diagram of another display control device shown according to an exemplary embodiment. As Figure 9 shown, the conversion module 203 may include:
[0180] A first conversion sub-module 2031, configured to convert the picture to be displayed from the RGB color space to the HSV color space to obtain a first intermediate picture.
[0181] A second conversion sub-module 2032, configured to convert the V color channel of the first intermediate picture according to the conversion parameter to obtain a second intermediate picture.
[0182] A third conversion sub-module 2033, configured to convert the second intermediate picture from the HSV color space to the RGB color space to obtain a target picture.
[0183] In an application scenario, the conversion parameter includes: a first conversion parameter and a second conversion parameter. The second conversion sub-module 2032 is configured to:
[0184] Invert the value of the first intermediate picture on the V color channel.
[0185] Multiply the inversion result by the first conversion parameter, and use the sum of the multiplication result and the second conversion parameter as the value of the second intermediate picture on the V color channel.
[0186] Figure 10 It is a block diagram of another display control device shown according to an exemplary embodiment. As Figure 10 shown, the determination module 202 includes:
[0187] A first determination sub-module 2021, configured to determine the current intensity interval to which the light intensity belongs among multiple intensity intervals.
[0188] A second determination sub-module 2022, configured to determine the duration for which the light intensity remains in the current intensity interval.
[0189] The third determination sub-module 2023 is configured to determine a conversion parameter according to the corresponding relationship and the current intensity range if the duration is greater than or equal to a specified duration threshold.
[0190] In another application scenario, the determination module 202 is configured to:
[0191] Among multiple intensity ranges, determine the current intensity range to which the light intensity belongs and the historical intensity range to which the historical light intensity belongs, where the historical light intensity is the light intensity of the environment where the terminal device was previously located.
[0192] If the current intensity range is different from the historical intensity range and the light intensity does not belong to the protection range of the current intensity range, determine a conversion parameter according to the corresponding relationship and the current intensity range.
[0193] If the current intensity range is different from the historical intensity range and the light intensity belongs to the protection range of the current intensity range, determine a conversion parameter according to the corresponding relationship and the historical intensity range.
[0194] In another application scenario, the determination module 202 is configured to:
[0195] Among multiple intensity ranges, determine the current intensity range to which the light intensity belongs and the historical intensity range to which the historical light intensity belongs, where the historical light intensity is the light intensity of the environment where the terminal device was previously located.
[0196] Determine the current conversion parameter according to the corresponding relationship and the current intensity range, and determine the historical conversion parameter according to the corresponding relationship and the historical intensity range.
[0197] According to a preset rule, determine multiple conversion parameters arranged in sequence between the historical conversion parameter and the current conversion parameter.
[0198] Correspondingly, the conversion module 203 is configured to:
[0199] Successively convert the lightness of the picture to be displayed in the HSV color space according to each conversion parameter to obtain a target picture, and draw the target picture on the display interface.
[0200] In another application scenario, the conversion module 203 is configured to:
[0201] Determine the value of the text part in the picture to be displayed in the RGB color space.
[0202] If the values of the text part on the R color channel, the G color channel, and the B color channel are all less than a preset threshold, adjust the text part according to the minimum value of the text part on the R color channel, the G color channel, and the B color channel to obtain the adjusted picture to be displayed.
[0203] Convert the brightness of the adjusted display screen to be displayed in the HSV color space according to the conversion parameter to obtain the target screen.
[0204] Figure 11 It is a block diagram of another display control device shown according to an exemplary embodiment. As Figure 11 shown, the determination module 202 is configured to:
[0205] Determine the conversion parameter and the picture mask corresponding to the light intensity according to the corresponding relationship.
[0206] Correspondingly, the conversion module 203 may further include:
[0207] A determination sub-module 2034, configured to determine the picture part and other parts in the display screen to be displayed.
[0208] A processing sub-module 2035, configured to process the picture part according to the picture mask and convert the brightness of other parts according to the conversion parameter to obtain the target screen.
[0209] A drawing sub-module 2036, configured to draw the target screen on the display interface.
[0210] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment related to the method, and will not be elaborated here.
[0211] In summary, the present disclosure first detects the light intensity of the environment where the terminal device is currently located when the terminal device turns on the specified display mode, and obtains the conversion parameter corresponding to the light intensity according to the preset corresponding relationship. Then, the brightness of the display screen to be displayed is converted according to the conversion parameter, so as to obtain the target screen corresponding to the specified display mode, and the target screen is drawn on the display interface of the terminal device. The present disclosure converts the brightness of the display screen to be displayed according to the light intensity of the environment where the terminal device is currently located, so as to obtain the target screen suitable for the current environment in the specified display mode, which can improve the flexibility of display adjustment and the comfort of the display interface.
[0212] The present disclosure also provides a computer-readable storage medium, on which computer program instructions are stored, and when the program instructions are executed by a processor, the steps of the display control method provided by the present disclosure are implemented.
[0213] Figure 12 It is a block diagram of a display control device 300 shown according to an exemplary embodiment. For example, the device 300 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0214] Reference Figure 12 Figure 12 , the apparatus 300 may include one or more of the following components: a processing component 302, a memory 304, a power component 306, a multimedia component 308, an audio component 310, an input / output (I / O) interface 312, a sensor component 314, and a communication component 316.
[0215]
[0215] The processing component 302 generally controls the overall operation of the apparatus 300, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 302 may include one or more processors 320 to execute instructions to complete all or part of the steps of the above-described display control method. In addition, the processing component 302 may include one or more modules to facilitate the interaction between the processing component 302 and other components. For example, the processing component 302 may include a multimedia module to facilitate the interaction between the multimedia component 308 and the processing component 302.
[0216]
[0216] The memory 304 is configured to store various types of data to support the operation of the apparatus 300. Examples of such data include instructions for any application or method operating on the apparatus 300, contact data, phone book data, messages, pictures, videos, etc. The memory 304 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, a magnetic disk, or an optical disk.
[0217]
[0217] The power component 306 provides power to the various components of the apparatus 300. The power component 306 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 300.
[0218] The multimedia component 308 includes a screen that provides an output interface between the device 300 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can sense not only the boundaries of touch or swipe actions but also detect the duration and pressure associated with the touch or swipe operation. In some embodiments, the multimedia component 308 includes a front camera and / or a rear camera. When the device 300 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each of the front camera and the rear camera can be a fixed optical lens system or have a focal length and optical zoom capabilities.
[0219] The audio component 310 is configured to output and / or input audio signals. For example, the audio component 310 includes a microphone (MIC) that is configured to receive external audio signals when the device 300 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals can be further stored in the memory 304 or transmitted via the communication component 316. In some embodiments, the audio component 310 further includes a speaker for outputting audio signals.
[0220] The I / O interface 312 provides an interface between the processing component 302 and a peripheral interface module, which can be a keyboard, a click wheel, buttons, etc. These buttons can include, but are not limited to: a home button, a volume button, a power button, and a lock button.
[0221] The sensor component 314 includes one or more sensors for providing an assessment of the various aspects of the state of the device 300. For example, the sensor component 314 can detect the on / off state of the device 300, the relative positioning of components, such as the display and the keypad of the device 300. The sensor component 314 can also detect a change in the position of the device 300 or a component of the device 300, the presence or absence of user contact with the device 300, the orientation or acceleration / deceleration of the device 300, and the temperature change of the device 300. The sensor component 314 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor component 314 can also include a light sensor, such as a CMOS or a CCD image sensor, for use in imaging applications. In some embodiments, the sensor component 314 can further include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0222] The communication component 316 is configured to facilitate communication between the device 300 and other devices in a wired or wireless manner. The device 300 can access a communication standard-based wireless network, such as WiFi, 2G, or 3G, or a combination thereof. In an exemplary embodiment, the communication component 316 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 316 further includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0223] In an exemplary embodiment, the device 300 can be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the above display control method.
[0224] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 304 including instructions, and the above instructions can be executed by the processor 320 of the device 300 to complete the above display control method. For example, the non-transitory computer-readable storage medium can be a ROM, Random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0225] In another exemplary embodiment, a computer program product is also provided, and the computer program product includes a computer program capable of being executed by a programmable device, and the computer program has a code portion for performing the above display control method when executed by the programmable device.
[0226] Those skilled in the art will readily conceive of other embodiments of the present disclosure after considering the specification and practicing the present disclosure. This application is intended to cover any variations, uses, or adaptations of the present disclosure, which follow the general principles of the present disclosure and include known common knowledge or conventional technical means in the technical field not disclosed by the present disclosure. The specification and embodiments are only regarded as exemplary, and the true scope and spirit of the present disclosure are pointed out by the following claims.
[0227] It should be understood that the present disclosure is not limited to the exact structures already described and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is only limited by the appended claims.
Claims
1. A display control method, characterized in that, The method includes: When the terminal device enables a specified display mode, detecting the light intensity of the environment where the terminal device is currently located; Determining a conversion parameter corresponding to the light intensity according to a preset correspondence; Converting the brightness of the picture to be displayed in the HSV color space according to the conversion parameter to obtain a target picture corresponding to the specified display mode, and drawing the target picture on the display interface of the terminal device, and the brightness of the picture to be displayed is converted by adjusting the V color channel of the HSV color space; The converting the brightness of the picture to be displayed in the HSV color space according to the conversion parameter to obtain a target picture corresponding to the specified display mode includes: Determining the value of the text part in the picture to be displayed in the RGB color space; If the values of the text part on the R color channel, the G color channel, and the B color channel are all less than a preset threshold, adjusting the text part according to the minimum value of the text part on the R color channel, the G color channel, and the B color channel to obtain the adjusted picture to be displayed; Converting the brightness of the adjusted picture to be displayed in the HSV color space according to the conversion parameter to obtain the target picture.
2. The method according to claim 1, wherein The converting the brightness of the picture to be displayed in the HSV color space according to the conversion parameter to obtain a target picture corresponding to the specified display mode further includes: Converting the picture to be displayed from the RGB color space to the HSV color space to obtain a first intermediate picture; Converting the V color channel of the first intermediate picture according to the conversion parameter to obtain a second intermediate picture; Converting the second intermediate picture from the HSV color space to the RGB color space to obtain the target picture.
3. The method according to claim 2, wherein The conversion parameter includes: a first conversion parameter and a second conversion parameter; the converting the V color channel of the first intermediate picture according to the conversion parameter to obtain a second intermediate picture includes: Inverting the value of the first intermediate picture on the V color channel; Multiplying the inverted result by the first conversion parameter and taking the sum of the multiplication result and the second conversion parameter as the value of the second intermediate picture on the V color channel.
4. The method according to claim 1, characterized in that The determining the conversion parameter corresponding to the light intensity according to a preset correspondence includes: Determining the current intensity interval to which the light intensity belongs among multiple intensity intervals; Determining the duration for which the light intensity remains in the current intensity interval; If the duration is greater than or equal to a specified duration threshold, determining the conversion parameter according to the correspondence and the current intensity interval.
5. The method according to claim 1, wherein The determining the conversion parameter corresponding to the light intensity according to a preset correspondence includes: Determining the current intensity interval to which the light intensity belongs and the historical intensity interval to which the historical light intensity belongs among multiple intensity intervals, where the historical light intensity is the light intensity of the environment where the terminal device was previously located; If the current intensity range is different from the historical intensity range, and the light intensity does not belong to the protection range of the current intensity range, determine the conversion parameter according to the corresponding relationship and the current intensity range; If the current intensity range is different from the historical intensity range, and the light intensity belongs to the protection range of the current intensity range, determine the conversion parameter according to the corresponding relationship and the historical intensity range.
6. The method according to claim 3, wherein The determining the conversion parameter corresponding to the light intensity according to a preset corresponding relationship includes: Among multiple intensity ranges, determine the current intensity range to which the light intensity belongs and the historical intensity range to which the historical light intensity belongs, where the historical light intensity is the light intensity of the environment where the terminal device was previously located; Determine the current conversion parameter according to the corresponding relationship and the current intensity range, and determine the historical conversion parameter according to the corresponding relationship and the historical intensity range; Determine multiple conversion parameters arranged in sequence between the historical conversion parameter and the current conversion parameter according to a preset rule; The converting the lightness of the picture to be displayed in the HSV color space according to the conversion parameter to obtain the target picture corresponding to the specified display mode, and drawing the target picture on the display interface of the terminal device includes: Convert the lightness of the picture to be displayed in the HSV color space according to each conversion parameter in sequence to obtain the target picture, and draw the target picture on the display interface.
7. The method according to claim 1, characterized in that The determining the conversion parameter corresponding to the light intensity according to a preset corresponding relationship includes: Determine the conversion parameter and the picture mask layer corresponding to the light intensity according to the corresponding relationship; The converting the lightness of the picture to be displayed in the HSV color space according to the conversion parameter to obtain the target picture corresponding to the specified display mode, and drawing the target picture on the display interface of the terminal device includes: Determine the picture part and other parts in the picture to be displayed; Process the picture part according to the picture mask layer, and convert the lightness of the other parts according to the conversion parameter to obtain the target picture; Draw the target picture on the display interface.
8. A display control device, characterized in that, The device includes: A detection module configured to detect the light intensity of the environment where the terminal device is currently located when the terminal device turns on the specified display mode; A determination module configured to determine the conversion parameter corresponding to the light intensity according to a preset corresponding relationship; A conversion module configured to convert the lightness of the picture to be displayed in the HSV color space according to the conversion parameter to obtain the target picture corresponding to the specified display mode, and draw the target picture on the display interface of the terminal device, where the lightness of the picture to be displayed is converted by adjusting the V color channel of the HSV color space; The conversion module is configured to: Determine the value of the text part in the picture to be displayed in the RGB color space; If the values of the text part on the R color channel, the G color channel, and the B color channel are all less than a preset threshold, adjust the text part according to the minimum value of the text part on the R color channel, the G color channel, and the B color channel to obtain the adjusted to-be-displayed picture; Convert the brightness of the adjusted to-be-displayed picture in the HSV color space according to the conversion parameter to obtain the target picture.
9. A display control device, characterized in that, Comprising: A processor; A memory for storing instructions executable by the processor; Wherein, the processor is configured to: When the terminal device enables a specified display mode, detect the light intensity of the environment where the terminal device is currently located; Determine the conversion parameter corresponding to the light intensity according to a preset corresponding relationship; Convert the brightness of the to-be-displayed picture in the HSV color space according to the conversion parameter to obtain the target picture corresponding to the specified display mode, and draw the target picture on the display interface of the terminal device, and the brightness of the to-be-displayed picture is converted by adjusting the V color channel of the HSV color space; The converting the brightness of the to-be-displayed picture in the HSV color space according to the conversion parameter to obtain the target picture corresponding to the specified display mode includes: Determine the value of the text part in the to-be-displayed picture in the RGB color space; If the values of the text part on the R color channel, the G color channel, and the B color channel are all less than a preset threshold, adjust the text part according to the minimum value of the text part on the R color channel, the G color channel, and the B color channel to obtain the adjusted to-be-displayed picture; Convert the brightness of the adjusted to-be-displayed picture in the HSV color space according to the conversion parameter to obtain the target picture.
10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the program instruction is executed by the processor, the steps of the method according to any one of claims 1-7 are implemented.
Citation Information
Patent Citations
Picture display method and device thereof
CN102163216A
Method for adjusting screen brightness
CN104538005A
Brightness adjusting method and device
CN105225647A
Color matching method and device of display content
CN105549928A
Dark mode display interface processing method, electronic equipment and storage medium
CN110609722A