Layer processing method and device, electronic equipment, storage medium and program product
By obtaining and adjusting the brightness value of the SDR layer in an electronic device, it can improve the brightness when synthesized with the HDR layer, the problem of poor recognition of the SDR layer is solved, and the clear display of controls and good interactive experience in low-light environments is achieved.
Patent Information
- Application Number
- CN202510449460.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-07-18
AI Technical Summary
In electronic devices, after the SDR layer is combined with the HDR layer, the SDR layer is poorly recognizable, especially in low-light environments, which makes it difficult to recognize the controls.
By obtaining the first brightness value of the SDR layer, ensuring that it is greater than the default brightness value and is less than or equal to the second brightness value of the HDR layer, and layer synthesis is performed based on these two brightness values, the brightness of the SDR layer is improved to reduce the brightness difference and ensure the recognition of the SDR layer.
While maintaining the highlight details of the HDR layer, it improves the recognition of the SDR layer, improves the interface clarity and interactive experience, and reduces the unclear problem caused by the SDR layer due to brightness suppression.
Smart Images

Figure CN120339463A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of layer processing, and in particular, to a layer processing method, apparatus, electronic device, storage medium, and program product. Background Art
[0002] HDR (High Dynamic Range) technology enables a picture to display more color levels and deeper contrast by expanding the dynamic range of the picture, that is, the brightness difference between the darkest part and the brightest part. Compared with traditional imaging technology, HDR technology can more realistically reproduce the lighting conditions of the shooting scene and provide a wider color space, thus significantly enhancing the visual effect of the picture.
[0003] Currently, the pages of some application programs in electronic devices such as mobile phones are obtained by synthesizing an SDR (Standard Dynamic Range) layer and a brightened HDR layer. However, the synthesized page may have a problem of poor recognition of the SDR layer. Summary of the Invention
[0004] Based on this, to address the above technical problems, it is necessary to provide a layer processing method, apparatus, electronic device, storage medium, and program product that can improve the recognition of the SDR layer.
[0005] In a first aspect, the present application provides a layer processing method. The layer processing method is used for an electronic device, and the method includes:
[0006] Obtain a first brightness value of the SDR layer. The SDR layer overlaps with the HDR layer, and the first brightness value is greater than the default brightness value of the SDR layer and less than or equal to the second brightness value of the HDR layer;
[0007] Based on the first brightness value and the second brightness value, perform layer synthesis processing on the SDR layer and the HDR layer.
[0008] In a second aspect, the present application further provides a layer processing apparatus. The layer processing apparatus is used for an electronic device, and the apparatus includes:
[0009] An obtaining module, configured to obtain a first brightness value of the SDR layer. The SDR layer overlaps with the HDR layer, and the first brightness value is greater than the default brightness value of the SDR layer and less than or equal to the second brightness value of the HDR layer;
[0010] A processing module, configured to perform layer synthesis processing on the SDR layer and the HDR layer based on the first brightness value and the second brightness value.
[0011] In a third aspect, the present application further provides an electronic device, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps of the method described in the first aspect above are implemented.
[0012] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described in the first aspect above are implemented.
[0013] In a fifth aspect, the present application further provides a computer program product, including a computer program. When the computer program is executed by a processor, the steps of the method described in the first aspect above are implemented.
[0014] For the above layer processing method, device, electronic device, storage medium, and program product, the electronic device obtains the first brightness value of the SDR layer. The SDR layer overlaps with the HDR layer, and the first brightness value is greater than the default brightness value of the SDR layer and less than or equal to the second brightness value of the HDR layer. Then, the electronic device performs layer composition processing on the SDR layer and the HDR layer based on the first brightness value and the second brightness value. In this way, in the embodiment of the present application when performing layer composition processing on the SDR layer and the HDR layer, the HDR layer is displayed with high brightness. For example, the second brightness value can be 5 times the default brightness value of the SDR layer. And because the SDR layer overlaps with the HDR layer, in order to avoid the problem of poor recognition of the SDR layer caused by a large difference in brightness between the SDR layer and the HDR layer (the brightness of the SDR layer is suppressed), the embodiment of the present application increases the brightness value of the SDR layer from the default brightness value to the first brightness value, thereby improving the recognition of the SDR layer while ensuring the high-brightness details of the HDR layer. Description of the Drawings
[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required to be used in the description of the embodiments of the present application or related technologies. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other related drawings can also be obtained based on these drawings.
[0016] Figure 1 It is a schematic diagram of a UI layer and a preview layer in an embodiment;
[0017] Figure 2 It is a flowchart of a layer processing method in an embodiment;
[0018] Figure 3 It is a flowchart of a layer processing method in another embodiment;
[0019] Figure 4 It is a schematic flowchart of step 301 in another embodiment;
[0020] Figure 5 It is a schematic flowchart of obtaining the first luminance value in another embodiment;
[0021] Figure 6 It is a schematic flowchart of a layer processing method in another embodiment;
[0022] Figure 7 It is a schematic flowchart of a layer processing method in another embodiment;
[0023] Figure 8 It is a schematic flowchart of a layer processing method in another embodiment;
[0024] Figure 9 It is a structural block diagram of a layer processing apparatus in one embodiment;
[0025] Figure 10 It is an internal structure diagram of an electronic device in one embodiment. Detailed implementation manners
[0026] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
[0027] HDR (High Dynamic Range) technology enables a picture to display more color levels and deeper contrast by expanding the dynamic range of the picture, that is, the luminance difference between the darkest part and the brightest part. Compared with traditional imaging technology, HDR technology can more realistically reproduce the lighting conditions of the shooting scene and provide a wider color space, thus significantly improving the visual effect of the picture.
[0028] Currently, the pages of some application programs in electronic devices such as mobile phones are obtained by synthesizing SDR (Standard Dynamic Range) layers and brightened HDR layers. The inventors of the present application have found through research that due to the suppressed luminance of the SDR layers, the recognizability of the SDR layers is poor.
[0029] For example, taking the camera application program in a mobile phone as an example, refer to Figure 1, the main page of the camera application is synthesized by a UI (User Interface) layer 101 and a preview layer 102. The UI layer 101 is an SDR layer, and various controls for interacting with the user are displayed on the UI layer 101; the preview layer 102 is an HDR layer, and the preview layer 102 is used to present a high-dynamic preview image. When performing layer composition processing on the UI layer 101 and the preview layer 102, the UI layer 101 is stacked above the preview layer 102, and generally the preview layer 102 is brightened while the brightness of the UI layer 101 is suppressed, which makes the controls in the UI layer 101 difficult to identify and have poor distinguishability. Especially when the ambient brightness of the electronic device is less than the brightness threshold, that is, when the electronic device is in a darker environment (such as a night environment), the brightness value of the UI layer 101 is small, and the brightness value of the preview layer 102 can reach 5 times or more of the brightness value of the UI layer 101, and the problem of poor distinguishability of the controls in the UI layer 101 is particularly prominent.
[0030] In view of this, the embodiments of the present application provide a layer processing method, apparatus, electronic device, storage medium, and program product, which can improve the distinguishability of the SDR layer.
[0031] The layer processing method provided by the embodiments of the present application can be applied to an electronic device. Among them, the electronic device can be, but is not limited to, various personal computers, laptop computers, smart phones, tablet computers, Internet of Things devices, and portable wearable devices. The Internet of Things device can be a smart speaker, a smart TV, a smart air conditioner, a smart vehicle-mounted device, a projection device, etc. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc. The head-mounted device can be a virtual reality (VR) device, an augmented reality (AR) device, a smart glasses, etc.
[0032] In an exemplary embodiment, as Figure 2 shown, a layer processing method is provided. Taking the application of this method to an electronic device as an example, this layer processing method includes the following steps 201 to step 202:
[0033] Step 201, obtain the first brightness value of the SDR layer.
[0034] There is an overlap between the SDR layer and the HDR layer. The SDR layer is used to present content with standard dynamics. For example, the SDR layer serves as the UI layer to present controls for user interaction; the HDR layer is used to present content with high dynamics. For example, the HDR layer is used to present high-dynamic-range images or videos. Exemplarily, the SDR layer is the UI layer of the camera application in the electronic device, and the HDR layer is the preview layer of the camera application; Exemplarily, the SDR layer is the UI layer of the video playback application in the electronic device, and the HDR layer is the video layer of the video playback application, and so on.
[0035] When the electronic device performs layer composition processing on the SDR layer and the HDR layer, the SDR layer can be located above the HDR layer.
[0036] In the embodiments of the present application, the SDR layer has a default brightness value. Optionally, the default brightness value is the default brightness of the screen of the electronic device, and this default brightness value can change with the ambient brightness of the environment around the electronic device. For example, when the ambient brightness increases, this default brightness value also increases; Optionally, the default brightness value can also be the screen brightness customized by the user. Exemplarily, a brightness adjustment control can be displayed on the screen of the electronic device, and the user can input a customized screen brightness based on this brightness adjustment control. The second brightness value of the HDR layer is greater than this default brightness value. Exemplarily, the second brightness value of the HDR layer can be 5 times this default brightness value, and so on.
[0037] The electronic device obtains the first brightness value of the SDR layer, and this first brightness value is greater than the default brightness value of the SDR layer and less than or equal to the second brightness value of the HDR layer. Continuing with the example where the SDR layer is the UI layer of the camera application in the electronic device and the HDR layer is the preview layer of the camera application, Exemplarily, assuming the default brightness value of the SDR layer is 100 nits, and the second brightness value of the HDR layer is, for example, 500 nits, then the first brightness value of the SDR layer can be 250 nits or 300 nits, etc.
[0038] In the embodiments of the present application, optionally, the first brightness value can be a pre-configured static brightness value, and this first brightness value is stored in a certain storage location of the electronic device, and the electronic device reads this first brightness value from this storage location; Optionally, the first brightness value can also be dynamically determined by the electronic device, and the method for dynamic determination will be introduced in the following embodiments.
[0039] In the actual application process, the brightness value can also be reflected by the white point value (White Point), that is, the electronic device can obtain the white point value of the SDR layer and use the obtained white point value as the first brightness value, and so on.
[0040] In the embodiments of the present application, the number of SDR layers is one or more, and the number of HDR layers is one or more. The first brightness value obtained by the electronic device is the first brightness value of each SDR layer, and the brightness value of each HDR layer is the second brightness value. In the following embodiments, the number of SDR layers and HDR layers is one respectively for introduction.
[0041] Step 202: Perform layer composition processing on the SDR layer and the HDR layer based on the first brightness value and the second brightness value.
[0042] After the electronic device obtains the first brightness value of the SDR layer, it performs layer composition processing on the SDR layer and the HDR layer based on the first brightness value and the second brightness value.
[0043] As an implementation manner, the electronic device can perform layer composition processing on the SDR layer and the HDR layer by a Distributed Processing Unit (DPU) according to the first brightness value and the second brightness value. The SDR layer can be located above the HDR layer.
[0044] Exemplarily, in the case where the SDR layer and the HDR layer completely overlap, the first brightness value is used as the brightness value of each pixel in the SDR layer, and the second brightness value is used as the brightness value of each pixel in the HDR layer. The distributed processing unit performs weighted summation on the brightness values of the two pixels at each pixel position in the SDR layer and the HDR layer according to the weights of the SDR layer and the HDR layer to obtain the brightness value of each pixel in the synthesized image.
[0045] Exemplarily, in the case where the SDR layer and the HDR layer partially overlap, the first brightness value is used as the brightness value of each pixel in the overlapping layer area of the SDR layer and the HDR layer, the default brightness value is used as the brightness value of each pixel in the layer area of the SDR layer that does not overlap with the HDR layer, and the second brightness value is used as the brightness value of each pixel in the HDR layer. For the overlapping layer area of the two, the distributed processing unit performs weighted summation on the brightness values of the two pixels at each pixel position in the layer area of the SDR layer and the HDR layer according to the weights of the SDR layer and the HDR layer to obtain the brightness value of each pixel corresponding to the layer area in the synthesized image. For the layer area where the two do not overlap, the brightness value of each pixel in the layer area of the SDR layer is used as the brightness value of each pixel corresponding to the layer area in the synthesized image.
[0046] In the above embodiments, when performing layer composition processing on the SDR layer and the HDR layer, the HDR layer is displayed in high brightness. For example, the second brightness value can be 5 times the default brightness value of the SDR layer. Since there is an overlap between the SDR layer and the HDR layer, in order to avoid the problem of poor recognition of the SDR layer caused by a large difference in brightness between the SDR layer and the HDR layer (i.e., the brightness of the SDR layer is suppressed), the embodiment of the present application increases the brightness value of the SDR layer from the default brightness value to the first brightness value. Thus, while ensuring the high-brightness details of the HDR layer, the recognition of the SDR layer can be improved, so that the content of the SDR layer in the finally presented interface remains clear, natural, non-glaring, and the interaction experience is improved.
[0047] In addition, by increasing the brightness value of the SDR layer, the embodiment of the present application can reduce the brightness difference between the SDR layer and the HDR layer, achieve the brightness balance between the SDR layer and the HDR layer, improve the overall consistency of the interface, and enhance the overall visual experience of the user.
[0048] In one embodiment, based on the Figure 2 embodiment shown below, a possible implementation manner for the electronic device to obtain the first brightness value of the SDR layer is introduced. Refer to Figure 3 , step 201 includes Figure 3 step 301 shown in
[0049] Step 301, obtain the first brightness value of each target pixel corresponding to the target control in the SDR layer.
[0050] Among them, the target control is a control with transparency in the overlapping layer area of the SDR layer and the HDR layer. Here, having transparency means that the target control is transparently or partially transparently displayed in the SDR layer, that is, the transparency of the target control is greater than 0. For example, the transparency is 50%, etc. The transparency of the target control can prevent the target control from being prominently displayed on the HDR layer after layer composition.
[0051] In the embodiment of the present application, when the electronic device performs layer composition processing on the SDR layer and the HDR layer, the SDR layer is located above the HDR layer. If the target control in the overlapping layer area of the SDR layer and the HDR layer has transparency, then the high brightness of the HDR layer will have a great impact on the clear display of the target control. Therefore, the electronic device uses the obtained first brightness value as the brightness value of each target pixel corresponding to the target control, and for the brightness values of other pixels in the SDR layer except each target pixel, the default brightness value can still be used.
[0052] Please continue to refer to Figure 3 , step 202 may include Figure 3 step 302 shown in
[0053] Step 302: The dispersion processing unit performs layer composition processing on the SDR layer and the HDR layer based on the first brightness value, the second brightness value, and the default brightness value.
[0054] For the SDR layer, the brightness value of each target pixel corresponding to the target control in the SDR layer is the first brightness value, the brightness value of other pixels except each target pixel in the SDR layer is the default brightness value, and the brightness value of each pixel in the HDR layer is the second brightness value.
[0055] Exemplarily, in the case where the SDR layer and the HDR layer completely overlap, the dispersion processing unit performs weighted summation on the brightness values of the two pixels at each pixel position in the SDR layer and the HDR layer according to the weights of the SDR layer and the HDR layer.
[0056] In the case where the SDR layer and the HDR layer partially overlap, for the overlapping layer area of the two, the dispersion processing unit performs weighted summation on the brightness values of the two pixels at each pixel position in the layer area of the SDR layer and the HDR layer according to the weights of the SDR layer and the HDR layer, and obtains the brightness values of the pixels corresponding to the layer area of the synthesized image. For the layer area where the two do not overlap, the brightness values of each pixel in the layer area of the SDR layer are used as the brightness values of the pixels corresponding to the layer area of the synthesized image.
[0057] The above embodiments can improve the problem that the target control with transparency in the overlapping layer area of the SDR layer and the HDR layer is not clearly displayed. While ensuring the high-brightness details of the HDR layer, it can ensure the clear and unobtrusive display of the target control in the SDR layer.
[0058] Next, two exemplary methods for dynamically determining the first brightness value are introduced.
[0059] 1) Based on the embodiment shown in Figure 3 , referring to Figure 4 , step 301 may include Figure 4 steps 401 and 402 shown in
[0060] Step 401: Obtain the control type of the target control.
[0061] In the embodiments of the present application, the control type is a dynamic feedback type or a static type. The dynamic feedback type means that the user can perform dynamic operations on the target control, and the target control needs to present corresponding content following the user's operation. For example, taking the camera application as an example, the target control of the dynamic feedback type may refer to the focal length adjustment control, and the target control of the static type may refer to the shooting control, etc.
[0062] Step 402: Determine the first brightness value according to the control type.
[0063] The electronic device can look up the first mapping table according to the control type. The first mapping table includes the first brightness values corresponding to each control type, so as to obtain the first brightness value corresponding to the control type of the target control. Among them, the first brightness value corresponding to the dynamic feedback type is greater than the first brightness value corresponding to the static type.
[0064] It can be understood that for the target control of the static type, since the content of the target control is fixed, even if the recognition of the target control in the SDR layer is poor, the impact on the interaction process is relatively small. However, for the target control of the dynamic feedback type, since the user needs to operate the target control dynamically and the target control needs to present the content corresponding to the user's operation, once the recognition of the target control in the SDR layer is not good, it will seriously affect the interaction process.
[0065] In view of this, in the embodiments of the present application, for the target control of the dynamic feedback type, increase its first brightness value. Compared with the target control of the static type, the difference between the first brightness value of each target pixel corresponding to the target control of the dynamic feedback type and the second brightness value of the HDR layer is smaller, which is more conducive to improving the recognition of the target control of the dynamic feedback type in the SDR layer and enhancing the interaction experience.
[0066] 2) On the basis of the embodiments shown in Figure 2 or Figure 3 Referring to Figure 5 , the electronic device can execute Figure 5 the steps 501 and 502 shown in
[0067] Step 501: Obtain the ambient brightness of the surrounding environment of the electronic device.
[0068] Exemplarily, corresponding sensors can be set in the electronic device, such as a light sensor, to detect the ambient brightness of the current surrounding environment of the electronic device through the sensor.
[0069] Step 502: Determine the first brightness value according to the ambient brightness.
[0070] The electronic device can look up the second mapping table according to the ambient brightness. The second mapping table includes the first brightness values corresponding to each ambient brightness, so as to obtain the first brightness value corresponding to the ambient brightness of the surrounding environment of the electronic device. Among them, the magnitude of the first brightness value is negatively correlated with the magnitude of the ambient brightness.
[0071] Since the default brightness value of the SDR layer can change with the ambient brightness, the default brightness value increases as the ambient brightness increases. When the ambient brightness is high, that is, when the electronic device is in a bright environment, the default brightness value of the SDR layer is large itself. However, since there is a brightness limit for the screen of the electronic device, the difference between the second brightness value of the HDR layer and the default brightness value of the SDR layer may not be very large. For example, the second brightness value may not be able to be increased to more than 5 times the default brightness value. In this case, in the embodiments of the present application, the first brightness value of the SDR layer obtained by the electronic device is correspondingly reduced, which can also improve the recognition of the SDR layer.
[0072] When the ambient brightness is low, that is, when the electronic device is in a dim environment, the default brightness value of the SDR layer is small itself. Even though there is a brightness limit for the screen of the electronic device, the second brightness value of the HDR layer can be increased to more than 5 times the default brightness value, and the difference between the second brightness value and the default brightness value of the SDR layer is large. In this case, in the embodiments of the present application, the first brightness value of the SDR layer obtained by the electronic device is correspondingly increased to improve the recognition of the SDR layer.
[0073] In the embodiments of the present application, the first brightness value can be flexibly set during implementation to meet the requirements of different scenarios and control designs, improving flexibility.
[0074] Hereinafter, taking the SDR layer as the UI layer of the camera application in the electronic device and the HDR layer as the preview layer of the camera application as an example, the implementation manner of the layer processing method for the electronic device in the embodiments of the present application will be introduced by way of example.
[0075] See Figure 6 , the layer processing method includes the following steps:
[0076] Step 601, obtain the ambient brightness of the surrounding environment of the electronic device.
[0077] Step 602, determine the first brightness value of the UI layer according to the ambient brightness.
[0078] The magnitude of the first brightness value is negatively correlated with the magnitude of the ambient brightness, and the first brightness value is greater than the default brightness value of the UI layer and less than or equal to the second brightness value of the preview layer.
[0079] Step 603, perform layer composition processing on the UI layer and the preview layer by the dispersion processing unit based on the first brightness value and the second brightness value of the preview layer.
[0080] See Figure 7 , the layer processing method includes the following steps:
[0081] Step 701, obtain the control type of the target control in the UI layer.
[0082] Among them, the UI layer and the preview layer overlap, and the target control is a control with transparency in the overlapping layer area of the UI layer and the preview layer, and the control type is a dynamic feedback type or a static type.
[0083] Step 702: Determine the first brightness value of each target pixel corresponding to the target control according to the control type.
[0084] Among them, the first brightness value is greater than the default brightness value of the UI layer and less than or equal to the second brightness value of the preview layer. The first brightness value corresponding to the dynamic feedback type is greater than the first brightness value corresponding to the static type, and the brightness values of other pixels in the UI layer except the target pixels are default brightness values.
[0085] Step 703: Perform layer composition processing on the UI layer and the preview layer by the dispersion processing unit based on the first brightness value, the second brightness value of the preview layer, and the default brightness value.
[0086] See Figure 8 , the layer processing method includes the following steps:
[0087] Step 801: Obtain the ambient brightness of the surrounding environment of the electronic device.
[0088] Step 802: Determine the first brightness value of each target pixel corresponding to the target control in the UI layer according to the ambient brightness.
[0089] Among them, the magnitude of the first brightness value is negatively correlated with the magnitude of the ambient brightness.
[0090] Among them, the target control is a control with transparency in the overlapping layer area of the UI layer and the preview layer, and the brightness values of other pixels in the UI layer except the target pixels are default brightness values.
[0091] Step 803: Perform layer composition processing on the UI layer and the preview layer by the dispersion processing unit based on the first brightness value, the second brightness value of the preview layer, and the default brightness value.
[0092] In the embodiment of the present application, by adjusting the brightness value of the UI layer, the custom adjustment of the brightness suppression degree of the UI layer is realized, so that in the overlapping area of the UI layer and the preview layer, the high-brightness details of the preview layer are maintained, and the controls in the UI layer will not be overexposed and dazzling, nor will they be too dark to be seen clearly.
[0093] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are sequentially shown according to the indications of the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless there is a clear indication in this article, there is no strict order limit for the execution of these steps, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least a part of other steps or steps or stages in other steps.
[0094] Based on the same inventive concept, an embodiment of the present application further provides a layer processing device for implementing the above-mentioned layer processing method. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the layer processing device provided below can refer to the limitations on the layer processing method in the above text, and will not be repeated here.
[0095] In an exemplary embodiment, as Figure 9 shown, a layer processing device is provided, including:
[0096] An acquisition module 901, configured to acquire a first brightness value of an SDR layer, where the SDR layer overlaps with an HDR layer, and the first brightness value is greater than a default brightness value of the SDR layer and less than or equal to a second brightness value of the HDR layer;
[0097] A processing module 902, configured to perform layer composition processing on the SDR layer and the HDR layer based on the first brightness value and the second brightness value.
[0098] In one of the embodiments, the acquisition module 901 includes:
[0099] An acquisition unit, configured to acquire the first brightness value of each target pixel corresponding to a target control in the SDR layer;
[0100] Wherein, the target control is a control with transparency in the layer area where the SDR layer overlaps with the HDR layer, and the brightness value of other pixels in the SDR layer except each target pixel is the default brightness value.
[0101] In one embodiment, the obtaining unit is specifically configured to obtain the control type of the target control, where the control type is a dynamic feedback type or a static type; determine the first brightness value according to the control type, and the first brightness value corresponding to the dynamic feedback type is greater than the first brightness value corresponding to the static type.
[0102] In one embodiment, the obtaining module 901 is specifically configured to obtain the ambient brightness of the surrounding environment of the electronic device; determine the first brightness value according to the ambient brightness, and the magnitude of the first brightness value is negatively correlated with the magnitude of the ambient brightness.
[0103] In one embodiment, the processing module 902 is specifically configured to perform layer composition processing on the SDR layer and the HDR layer through a distributed processing unit based on the first brightness value, the second brightness value, and the default brightness value.
[0104] In one embodiment, the SDR layer is the UI layer of the camera application in the electronic device, and the HDR layer is the preview layer of the camera application.
[0105] Each module in the above layer processing device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor in the electronic device in hardware form or independent of the processor, or stored in the memory in the electronic device in software form, so that the processor can call and execute the operations corresponding to the above modules.
[0106] In an exemplary embodiment, an electronic device is provided. The electronic device can be a terminal, and its internal structure diagram can be as Figure 10As shown in the figure. The electronic device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the electronic device is used to exchange information between the processor and external devices. The communication interface of the electronic device is used to communicate with external terminals in a wired or wireless manner. The wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a layer processing method. The display unit of the electronic device is used to form a visually visible picture, which can be a display screen, a projection device, or a virtual reality imaging device, and can also include a distributed processing unit. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the electronic device can be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the housing of the electronic device, or an external keyboard, touchpad, or mouse, etc.
[0107] Those skilled in the art can understand that Figure 10 the structure shown in the figure is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the electronic device to which the solution of this application is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0108] The embodiment of this application also provides a computer-readable storage medium. One or more non-volatile computer-readable storage media containing computer-executable instructions, when the computer-executable instructions are executed by one or more processors, cause the processors to execute the steps of the layer processing method.
[0109] The embodiment of this application also provides a computer program product containing instructions, which when run on a computer, causes the computer to execute the layer processing method.
[0110] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant regulations.
[0111] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logics based on quantum computing, artificial intelligence (AI) processors, etc., without limitation.
[0112] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered to be within the scope recorded in the present application.
[0113] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation to the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all fall within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.
Claims
1. A method for processing a layer, characterized in that, For an electronic device, the method includes: Obtain a first brightness value of the SDR layer, where the SDR layer overlaps with the HDR layer, and the first brightness value is greater than the default brightness value of the SDR layer and less than or equal to a second brightness value of the HDR layer; Based on the first brightness value and the second brightness value, perform layer composition processing on the SDR layer and the HDR layer.
2. The method according to claim 1, characterized in that The obtaining of the first brightness value of the SDR layer includes: Obtain the first brightness value of each target pixel corresponding to a target control in the SDR layer; Wherein, the target control is a control with transparency in the overlapping layer area of the SDR layer and the HDR layer, and the brightness value of other pixels in the SDR layer except each target pixel is the default brightness value.
3. The method according to claim 2, wherein The obtaining of the first brightness value of each target pixel corresponding to the target control in the SDR layer includes: Obtain the control type of the target control, and the control type is a dynamic feedback type or a static type; Determine the first brightness value according to the control type, and the first brightness value corresponding to the dynamic feedback type is greater than the first brightness value corresponding to the static type.
4. The method according to claim 1 or 2, characterized in that, The obtaining process of the first brightness value includes: Obtain the ambient brightness of the surrounding environment of the electronic device; Determine the first brightness value according to the ambient brightness, and the magnitude of the first brightness value is negatively correlated with the magnitude of the ambient brightness.
5. The method according to claim 2, wherein The performing of layer composition processing on the SDR layer and the HDR layer based on the first brightness value and the second brightness value includes: Through a dispersion processing unit, perform layer composition processing on the SDR layer and the HDR layer based on the first brightness value, the second brightness value, and the default brightness value.
6. The method according to claim 1, wherein The SDR layer is the UI layer of the camera application in the electronic device, and the HDR layer is the preview layer of the camera application.
7. A layer processing device, characterized in that, The device includes: An obtaining module, configured to obtain a first brightness value of the SDR layer, where the SDR layer overlaps with the HDR layer, and the first brightness value is greater than the default brightness value of the SDR layer and less than or equal to a second brightness value of the HDR layer; A processing module, configured to perform layer composition processing on the SDR layer and the HDR layer based on the first brightness value and the second brightness value.
8. An electronic device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 6 are implemented.