Brightness adjustment method, electronic device, storage medium and computer program product

By calculating the brightness gradient value and battery SOC coefficient for each image frame, the brightness of HDR video is adjusted in a personalized manner, solving the problem of detail loss caused by uniform adjustment and improving display quality.

CN121486631APending Publication Date: 2026-02-06MIGU VIDEO TECH CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511469866.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-14
Publication Date
2026-02-06

AI Technical Summary

Technical Problem

In existing technologies, in order to improve the battery life of display devices, the brightness of all image frames in HDR video is uniformly reduced, which leads to the loss of details in the image frames and affects the display quality.

Method used

For each image frame, a brightness gradient value and a battery SOC coefficient are determined. A personalized brightness adjustment coefficient is calculated through a model to flexibly adjust the brightness of the image frame and avoid loss of detail caused by uniform reduction.

Benefits of technology

It achieves energy saving while maintaining the detail of each image frame, thus improving the display quality of HDR video.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121486631A_ABST
    Figure CN121486631A_ABST
Patent Text Reader

Abstract

The invention provides a brightness adjusting method, electronic equipment, a storage medium and a computer program product. The method comprises the following steps: for each image frame in an HDR video, determining a brightness gradient value corresponding to each pixel of the image frame; the brightness gradient value is used for reflecting the brightness change of the pixel value of the pixel and the adjacent pixel value; obtaining a battery SOC coefficient of a device used for displaying the image frame; determining a brightness adjustment coefficient of the image frame based on the brightness gradient value corresponding to each pixel of the image frame and the battery SOC coefficient; and adjusting the brightness of the image frame based on the brightness adjustment coefficient. According to the invention, the display quality of the image frame after brightness adjustment can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to a brightness adjustment method, electronic device, storage medium, and computer program product. Background Technology

[0002] With the development of High Dynamic Range Imaging (HDR) technology, HDR technology has been widely used in film, television, games, and other fields, typically manifesting as HDR video. When HDR video is displayed on a display device, the display brightness increases, which increases the device's power consumption and thus affects its battery life.

[0003] In related technologies, to improve the battery life of display devices, the brightness of all image frames in HDR video is typically reduced by a fixed ratio to achieve energy savings. However, this brightness adjustment method in related technologies can easily lead to the loss of details in image frames, resulting in poor display quality of the HDR video after brightness adjustment. Summary of the Invention

[0004] To address the related technical problems, embodiments of this application provide a brightness adjustment method, an electronic device, a storage medium, and a computer program product.

[0005] The technical solution of this application embodiment is implemented as follows: This application provides a brightness adjustment method, the method comprising: For each image frame in an HDR video, determine the brightness gradient value corresponding to each pixel of the image frame; the brightness gradient value is used to reflect the brightness change between the pixel value and the values ​​of adjacent pixels; and obtain the state of charge (SOC) coefficient of the battery of the device used to display the image frame. The brightness adjustment coefficient of the image frame is determined based on the brightness gradient value corresponding to each pixel of the image frame and the battery SOC coefficient. The brightness of the image frame is adjusted based on the brightness adjustment coefficient.

[0006] In the above scheme, determining the brightness adjustment coefficient of the image frame based on the brightness gradient value corresponding to each pixel of the image frame and the battery SOC coefficient includes: A first coefficient is determined based on the brightness gradient value corresponding to each pixel of the image frame; the first coefficient is used to reflect the amount of brightness redundancy information in the image frame. The first coefficient and the battery SOC coefficient are input into the model for processing to obtain the brightness adjustment coefficient of the image frame; the model is used to output the brightness adjustment coefficient based on the first coefficient and the battery SOC coefficient.

[0007] In the above scheme, determining the first coefficient based on the brightness gradient values ​​corresponding to each pixel of the image frame includes: The mean value of the brightness gradient of the image frame is determined based on the brightness gradient value corresponding to each pixel of the image frame. The first coefficient is determined by taking the reciprocal of the mean of the brightness gradient values ​​of the image frames.

[0008] In the above scheme, the step of inputting the first coefficient and the battery SOC coefficient into the model for processing to obtain the brightness adjustment coefficient of the image frame includes: Input the first coefficient and the battery SOC coefficient into the model; The model performs a weighted summation of the first coefficient and the battery SOC coefficient to obtain a first value; and based on the first value, the brightness adjustment coefficient of the image frame is determined. The brightness adjustment coefficient of the image frame is obtained by outputting the brightness adjustment coefficient of the image frame through the model.

[0009] In the above scheme, determining the brightness gradient value corresponding to each pixel of the image frame includes: Based on the correspondence between pixel values ​​and brightness gradient values, and the pixel values ​​of each pixel in the image frame, the brightness gradient value corresponding to each pixel in the image frame is determined.

[0010] In the above scheme, determining the brightness gradient value corresponding to each pixel of the image frame includes: For the r-th pixel in an image frame, determine the brightness value corresponding to the pixel value of the r-th pixel, and the brightness value corresponding to the pixel value of the r-th pixel minus 1; where the image frame contains n pixels, r is an integer greater than 1 and less than or equal to n, and n is an integer greater than 1; The brightness gradient value of the r-th pixel is determined based on the brightness value corresponding to the pixel value of the r-th pixel and the brightness value corresponding to the pixel value of the r-th pixel minus 1.

[0011] The method in the above scheme further includes: The brightness adjustment coefficients of each image frame are smoothed to obtain the processed coefficients; The brightness of the image frame is adjusted based on the processed coefficients.

[0012] This application embodiment also provides a brightness adjustment device, the device comprising: The first determining module is used to determine the brightness gradient value corresponding to each pixel of each image frame in the HDR video; the brightness gradient value is used to reflect the brightness change between the pixel value and the adjacent pixel values; and to obtain the battery SOC coefficient of the device used to display the image frame. The second determining module is used to determine the brightness adjustment coefficient of the image frame based on the brightness gradient value corresponding to each pixel of the image frame and the battery SOC coefficient. An adjustment module is used to adjust the brightness of the image frame based on the brightness adjustment coefficient.

[0013] This application also provides an electronic device, including a processor and a memory for storing a computer program capable of running on the processor. When the processor runs the computer program, it executes the steps of any of the above methods.

[0014] This application also provides a storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of any of the above methods.

[0015] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above methods.

[0016] The brightness adjustment method, electronic device, storage medium, and computer program product provided in this application determine the brightness gradient value corresponding to each pixel of each image frame in an HDR video; the brightness gradient value is used to reflect the brightness change between the pixel value and the values ​​of adjacent pixels; and the battery SOC coefficient of the device used to display the image frame is obtained; based on the brightness gradient value and the battery SOC coefficient corresponding to each pixel of the image frame, the brightness adjustment coefficient of the image frame is determined; and the brightness of the image frame is adjusted based on the brightness adjustment coefficient. In this embodiment, a brightness adjustment coefficient is determined by the brightness gradient value of each image frame in the HDR video and the battery SOC coefficient of the device used to display the image frame. The brightness of the image frame is then adjusted according to the brightness adjustment coefficient. This approach considers both energy saving by utilizing the battery SOC coefficient and adjusting the brightness of the corresponding image frame using the brightness adjustment coefficient determined by the battery SOC coefficient and the brightness gradient value of the image frame. This means that the brightness adjustment coefficients for different image frames may differ, enabling flexible adjustment of image frame brightness. Compared to related technologies that uniformly reduce the brightness of all image frames in an HDR video by a fixed ratio, resulting in some image frames being too dark and causing loss of detail, the brightness adjustment method in this embodiment determines a brightness adjustment coefficient for each image frame in the HDR video. This allows for adjustment of the brightness of the corresponding image frame based on the determined brightness adjustment coefficient, adapting to different image frames and preventing excessively dark image frames. The details of each image frame are well displayed, improving the display quality of the image frames after brightness adjustment. Attached Figure Description

[0017] Figure 1 This is a schematic flowchart of a brightness adjustment method according to an embodiment of this application; Figure 2 This is a schematic diagram illustrating the correspondence between pixel values ​​and brightness values ​​in an embodiment of this application; Figure 3 This is a schematic diagram of the brightness adjustment device structure according to an embodiment of this application; Figure 4 This is a schematic diagram of the electronic device structure according to an embodiment of this application. Detailed Implementation

[0018] The present application will now be described in further detail with reference to the accompanying drawings and embodiments.

[0019] Currently, HDR technology is widely used in film, television, and gaming. For example, many video streaming platforms support HDR video streaming, allowing users to watch HDR video content on devices such as TVs and cinemas that support HDR display technology. Meanwhile, many high-end TVs and monitors also support HDR display technology to provide a more realistic, brighter, and deeper visual experience. Many mobile devices also support HDR display functionality and can display HDR video. Furthermore, many games have begun to adopt HDR technology to provide more realistic visual effects and a more immersive gaming experience.

[0020] However, when displaying HDR video on devices that support HDR technology, the display brightness increases, which raises power consumption and affects battery life. To improve battery life or enable power-saving mode, the brightness of all image frames in the HDR video is typically reduced by a fixed ratio. An image frame can be understood as a video frame. This brightness adjustment method, regardless of the specific brightness of each image frame in the HDR video, reduces brightness by a uniform ratio, which can easily lead to loss of detail in the image frames. Many details in the adjusted image frames are not easily visible to the user, resulting in poor display quality of the HDR video.

[0021] Based on this, in various embodiments of this application, for each image frame in an HDR video, the brightness gradient value corresponding to each pixel of the image frame is determined; the brightness gradient value is used to reflect the brightness change between the pixel value and the values ​​of adjacent pixels; and the battery SOC coefficient of the device used to display the image frame is obtained; based on the brightness gradient value corresponding to each pixel of the image frame and the battery SOC coefficient, the brightness adjustment coefficient of the image frame is determined; and the brightness of the image frame is adjusted based on the brightness adjustment coefficient. In this embodiment, a brightness adjustment coefficient is determined by the brightness gradient value of each image frame in the HDR video and the battery SOC coefficient of the device used to display the image frame. The brightness of the image frame is then adjusted according to the brightness adjustment coefficient. This approach considers both energy saving by utilizing the battery SOC coefficient and adjusting the brightness of the corresponding image frame using the brightness adjustment coefficient determined by the battery SOC coefficient and the brightness gradient value of the image frame. This means that the brightness adjustment coefficients for different image frames may differ, enabling flexible adjustment of image frame brightness. Compared to related technologies that uniformly reduce the brightness of all image frames in an HDR video by a fixed ratio, resulting in some image frames being too dark and causing loss of detail, the brightness adjustment method in this embodiment determines a brightness adjustment coefficient for each image frame in the HDR video. This allows for adjustment of the brightness of the corresponding image frame based on the determined brightness adjustment coefficient, adapting to different image frames and preventing excessively dark image frames. The details of each image frame are well displayed, improving the display quality of the image frames after brightness adjustment.

[0022] This application provides a brightness adjustment method applied to an electronic device, specifically a device for displaying image frames. The electronic device can run the brightness adjustment method provided in this application; for example, the electronic device may include a mobile terminal or a player, and the specific device is not limited thereto; the player may be located in the mobile terminal. The electronic device may have a display screen, which can be used to display HDR video and / or HDR video after brightness adjustment. Figure 1 As shown, the method includes: Step 101: For each image frame in the HDR video, determine the brightness gradient value corresponding to each pixel of the image frame; the brightness gradient value is used to reflect the brightness change between the pixel value and the values ​​of adjacent pixels; and obtain the battery SOC coefficient of the device used to display the image frame; Step 102: Determine the brightness adjustment coefficient of the image frame based on the brightness gradient value corresponding to each pixel of the image frame and the battery SOC coefficient; Step 103: Adjust the brightness of the image frame based on the brightness adjustment coefficient.

[0023] In practical applications, electronic devices can adjust the brightness of the HDR video to be displayed; they can also adjust the brightness of the HDR video to be displayed upon receiving a brightness adjustment command initiated by the user. For example, the brightness adjustment command may include a command to enable the energy-saving display mode of the electronic device. The specific brightness adjustment command is not limited.

[0024] Adjusting the brightness of an HDR video means adjusting the brightness of each image frame in the HDR video.

[0025] For each image frame in an HDR video, in some optional embodiments, determining the luminance gradient value corresponding to each pixel of the image frame includes: Based on the correspondence between pixel values ​​and brightness gradient values, and the pixel values ​​of each pixel in the image frame, the brightness gradient value corresponding to each pixel in the image frame is determined.

[0026] In practical applications, the correspondence between pixel values ​​and brightness gradient values ​​is first obtained so that it can be used to determine the brightness gradient value corresponding to each pixel in the image frame.

[0027] Obtaining the correspondence between pixel values ​​and brightness gradient values ​​can include: Obtain the protocol format and electro-optical transfer function (EOTF) of HDR video. Electro-Optical Transfer Function (Electro-Optical Transfer Function) information; Based on the protocol format and EOTF information of HDR video, the correspondence between pixel values ​​and luminance values ​​of HDR video is determined. Based on the correspondence between pixel values ​​and luminance values ​​in HDR videos, the correspondence between pixel values ​​and luminance gradient values ​​is determined.

[0028] For example, if the protocol format of an HDR video is HDR10+, and the EOTF information is the absolute value of luminance (PQ, Perceptual Quantizer) EOTF, then the correspondence between the pixel values ​​and luminance values ​​of the determined HDR video is as follows: Figure 2 As shown. HDR video has a pixel value range of 0-1023 and a brightness value range of 0-10000 nits (nits). Based on Figure 2 The correspondence between pixel values ​​and luminance values ​​shown in the HDR video is as follows: when p=0, D(p)=0; when p=1-1023, D(p)=Lp-Lp-1, where p represents the pixel value, D(p) represents the luminance gradient value corresponding to the pixel value p, Lp represents the luminance value corresponding to the pixel value p, and Lp-1 represents the luminance value corresponding to the pixel value p-1.

[0029] Understandably, the larger the brightness gradient value corresponding to a pixel value, the greater the brightness redundancy information contained in that pixel value and its neighboring pixels. In HDR video, areas with larger brightness gradient values ​​contain fewer details that need to be distinguished. Compressing areas with larger brightness gradient values ​​(which can be understood as brightness compression) means that adjusting brightness has a smaller impact on the details in that area, thus allowing for greater room for compression in brightness adjustment, i.e., a smaller brightness adjustment coefficient. Specifically, a larger brightness gradient value indicates a more drastic change in brightness between adjacent pixels, potentially corresponding to high-contrast areas in HDR video, such as edges and contours. In high brightness gradient areas, adjusting brightness has less impact on details, allowing for greater compression. A smaller brightness gradient value may represent a smoother area, such as the sky or background. In low brightness gradient areas, brightness adjustment needs to be more careful to prevent loss of image details. In practical applications, an image frame is usually understood as a region.

[0030] Based on the correspondence between pixel values ​​and brightness gradient values, and the pixel values ​​of each pixel in the image frame, the brightness gradient value corresponding to each pixel in the image frame is determined, including: For each pixel value in the image frame, the corresponding brightness gradient value is determined by searching the correspondence between pixel values ​​and brightness gradient values.

[0031] In this embodiment, based on the correspondence between pixel values ​​and brightness gradient values, the brightness gradient value corresponding to each pixel can be determined more quickly, improving the efficiency of determining the brightness gradient value. The determination of the brightness gradient value serves as the basis for subsequent brightness adjustment coefficient calculation, enabling different image frames to be differentiated according to the brightness change characteristics of the image frame, i.e., the brightness gradient value. This achieves energy saving while preserving sufficient visual details and improving the overall display quality of HDR video.

[0032] For each image frame in an HDR video, another method for determining the luminance gradient value corresponding to each pixel of the image frame, in some optional embodiments, includes: For the r-th pixel in an image frame, determine the brightness value corresponding to the pixel value of the r-th pixel, and the brightness value corresponding to the pixel value of the r-th pixel minus 1; where the image frame contains n pixels, r is an integer greater than 1 and less than or equal to n, and n is an integer greater than 1; The brightness gradient value of the r-th pixel is determined based on the brightness value corresponding to the pixel value of the r-th pixel and the brightness value corresponding to the pixel value of the r-th pixel minus 1.

[0033] Here, determining the brightness value corresponding to the pixel value of the r-th pixel can include: Obtain the protocol format and EOTF information of HDR video; Based on the protocol format and EOTF information of HDR video, the correspondence between pixel values ​​and luminance values ​​of HDR video is determined. Based on the correspondence between pixel values ​​and luminance values ​​in HDR video, the luminance value corresponding to the pixel value of the r-th pixel is determined.

[0034] Based on the correspondence between pixel values ​​and brightness values ​​in HDR video, the brightness value corresponding to the pixel value of the r-th pixel minus 1 can be determined.

[0035] The brightness gradient value of the r-th pixel is determined based on the brightness value corresponding to the pixel value of the r-th pixel and the brightness value corresponding to the pixel value of the r-th pixel minus 1, which may include: The difference between the brightness value corresponding to the pixel value of the r-th pixel and the brightness value corresponding to the pixel value of the r-th pixel minus 1 is determined as the brightness gradient value of the r-th pixel.

[0036] It is understandable that if the pixel value of the r-th pixel is 0, then the brightness gradient value of the r-th pixel is 0.

[0037] In this embodiment, brightness gradient calculation is performed only on the pixel values ​​of each pixel in the image frame, without having to calculate the brightness gradient of all pixel values. This reduces resource waste. Furthermore, by calculating the brightness gradient value pixel by pixel, a refined analysis of the brightness redundancy information of each pixel in the image frame can be achieved, thereby obtaining more accurate brightness information of the image frame. This provides data support for subsequent brightness adjustment and helps improve display quality.

[0038] Before determining the brightness adjustment coefficient of the image frame, it is also necessary to obtain the battery SOC coefficient of the device used to display the image frame. The battery SOC coefficient of the device used to display the image frame can be obtained in real time through third-party detection software, and the specific method for obtaining the battery SOC coefficient is not limited.

[0039] To improve the accuracy of the brightness adjustment coefficient, it can be determined using a pre-trained model. Based on this, in some optional embodiments, determining the brightness adjustment coefficient of the image frame based on the brightness gradient values ​​corresponding to each pixel of the image frame and the battery SOC coefficient includes: A first coefficient is determined based on the brightness gradient value corresponding to each pixel of the image frame; the first coefficient is used to reflect the amount of brightness redundancy information in the image frame. The first coefficient and the battery SOC coefficient are input into the model for processing to obtain the brightness adjustment coefficient of the image frame; the model is used to output the brightness adjustment coefficient based on the first coefficient and the battery SOC coefficient.

[0040] Here, the mean value reflects the overall brightness variation within an image frame. Determining the first coefficient (which can be understood as a positive correlation coefficient) using the mean value improves the efficiency and accuracy of determining the first coefficient. Therefore, in some optional embodiments, determining the first coefficient based on the brightness gradient values ​​corresponding to each pixel of the image frame includes: The mean value of the brightness gradient of the image frame is determined based on the brightness gradient value corresponding to each pixel of the image frame. The first coefficient is determined by taking the reciprocal of the mean of the brightness gradient values ​​of the image frames.

[0041] Here, the mean value of the brightness gradient of the image frame can be calculated using formula (1): (1) in, The mean value of the brightness gradient of the i-th image frame. The value represents the luminance gradient of the r-th pixel in the i-th image frame, where n represents the number of pixels in the i-th image frame; i = 1 - m, where m is the number of image frames in the HDR video.

[0042] The first coefficient of the i-th image frame is .

[0043] In this embodiment of the application, by refining the method of determining the first coefficient and clarifying the calculation method of the first coefficient, the efficiency of determining the first coefficient can be improved. Furthermore, by averaging the brightness gradient values ​​of all pixels in the image frame, the processing can be simplified, and the overall trend can be extracted to obtain the overall brightness gradient information of the image frame for subsequent calculation of the brightness adjustment coefficient.

[0044] After determining the first coefficient, the first coefficient and the battery SOC coefficient are input into the model for processing to obtain the brightness adjustment coefficient of the image frame. The model may include a logistic regression model.

[0045] Understandably, the model can be trained in advance. For example... Figure 2 As shown, the larger the mean of the brightness gradient values ​​of an image frame, the more brightness redundancy information the image frame contains, allowing for a greater reduction in brightness; that is, a smaller brightness adjustment coefficient. Conversely, a smaller first coefficient results in a smaller brightness adjustment coefficient. A larger battery SOC coefficient allows for displaying the image frame at a higher brightness, also requiring a larger brightness adjustment coefficient. The model balances these two parameters—the first coefficient and the battery SOC coefficient—resulting in a highly accurate brightness adjustment coefficient for the obtained image frame.

[0046] In this embodiment, a first coefficient is calculated based on the brightness gradient value, and a brightness adjustment coefficient is output by the model in combination with the battery SOC coefficient. The model is pre-trained, and the brightness adjustment coefficient obtained by inputting the brightness gradient information and the battery SOC coefficient into the model is more accurate. This realizes dynamic adjustment of brightness according to the brightness characteristics of the image frame and the SOC status of the electronic device, which can effectively balance energy consumption and display quality.

[0047] The model performs a weighted summation of the first coefficient and the battery SOC coefficient to output a brightness adjustment coefficient based on these two coefficients. The model can adjust the proportions of the first coefficient and the battery SOC coefficient, improving the accuracy of the brightness adjustment coefficient. Therefore, in some optional embodiments, the step of inputting the first coefficient and the battery SOC coefficient into the model for processing to obtain the brightness adjustment coefficient of the image frame includes: Input the first coefficient and the battery SOC coefficient into the model; The first value is obtained by weighted summation of the first coefficient and the battery SOC coefficient using the model; and the brightness adjustment coefficient of the image frame is determined based on the first value. The brightness adjustment coefficient of the image frame is obtained by outputting the brightness adjustment coefficient of the image frame through the model.

[0048] Here, the first value can be calculated using formula (2): (2) in, The first value representing the i-th image frame. , and Characteristic weights, The first coefficient characterizing the i-th image frame; S Characterizing the SOC coefficient of the battery, 0≤ S ≤1. (Can be) and S Mapped to the interval [0, 1].

[0049] The brightness adjustment coefficient of the image frame can be calculated using formula (3): (3) in, The brightness adjustment coefficient represents the i-th image frame.

[0050] The model is trained by training the weights, i.e. , and .

[0051] Training the model can include: Obtain a sample set; the sample set should include at least the mean of the brightness gradient values ​​of the sample images, the battery SOC coefficient, and the actual brightness adjustment coefficient. The model is trained based on the sample set to obtain the trained model.

[0052] Training the model based on a sample set to obtain the trained model may include: inputting the reciprocal of the mean of the brightness gradient values ​​of the sample images (i.e., the first coefficient) and the battery SOC coefficient into the model to obtain the predicted brightness adjustment coefficient; calculating the loss value based on the predicted brightness adjustment coefficient and the actual brightness adjustment coefficient; and adjusting the model weights using the loss value and the gradient descent algorithm until a set model convergence condition is met to obtain the trained model. For example, the set model convergence condition may include reaching a set number of training iterations, but the specific details are not limited.

[0053] The sample set is shown in Table 1 below. Table 1 is only an example and does not constitute a limitation.

[0054] The sample set includes U-frame sample images, including I1, I2, ..., I... U .

[0055] In Table 1, U represents the number of sample images, Xu represents the mean of the brightness gradient values ​​of the u-th sample image, Yu represents the reciprocal of the mean of the brightness gradient values ​​of the u-th sample image, which is the first coefficient of the u-th sample image, Su represents the battery SOC coefficient corresponding to the u-th sample image, and Q'u represents the actual brightness adjustment coefficient corresponding to the u-th sample image.

[0056] Table 1

[0057] The loss value is calculated using the loss function formula (4): (4) in, .

[0058] In this embodiment of the application, by weighting and summing the first coefficient and the battery SOC coefficient using a model, the proportion of the first coefficient and the battery SOC coefficient can be adjusted, thereby improving the accuracy of the brightness adjustment coefficient, helping to improve the display quality after brightness adjustment, and thus enhancing the user's viewing experience.

[0059] After obtaining the brightness adjustment coefficient for each image frame of the HDR video, the brightness adjustment coefficient can be multiplied by the original display brightness of the corresponding image frame to obtain the adjusted display brightness. The adjusted display brightness is then used to display the image frame, thus completing the brightness adjustment of the HDR video.

[0060] To avoid excessive brightness differences between adjacent image frames in HDR video, after determining the brightness adjustment coefficient for each image frame in the HDR video, the brightness adjustment coefficients of each image frame can be processed, and the brightness of the image frame can be adjusted using the processed coefficients. Based on this, in some optional embodiments, the brightness adjustment method further includes: The brightness adjustment coefficients of each image frame are smoothed to obtain the processed coefficients; The brightness of the image frame is adjusted based on the processed coefficients.

[0061] Here, smoothing the brightness adjustment coefficients of each image frame can include: smoothing the brightness adjustment coefficients of each image frame using a filter to make the brightness changes between adjacent image frames more stable. The filter can include a mean filter, a median filter, or other smoothing filters.

[0062] It is understandable that there are n coefficients before processing and n coefficients after processing, and the number of coefficients will not be reduced. Each image frame corresponds to one coefficient after processing.

[0063] Adjusting the brightness of an image frame based on the processed coefficients may include: multiplying the processed coefficients by the original display brightness of the corresponding image frame to obtain the adjusted display brightness, and using the adjusted display brightness to display the image frame, thereby completing the brightness adjustment of the HDR video.

[0064] In this embodiment, the HDR video includes multiple frames of images, and each frame has a brightness adjustment coefficient. To avoid excessive brightness differences between the frames after adjustment by the brightness adjustment coefficient, the brightness adjustment coefficient is filtered, i.e., smoothed. The brightness is adjusted using the smoothed coefficient, so the adjusted HDR video will not be flickering and will not give the user the feeling of brightness fluctuation. This effectively reduces the brightness jump phenomenon between adjacent frames, achieves a smoother and more natural visual effect, and improves the user's video viewing experience.

[0065] Display the HDR video after brightness adjustment.

[0066] The brightness adjustment method provided in this application determines a brightness adjustment coefficient based on the brightness gradient value of each image frame in the HDR video and the battery SOC coefficient of the device used to display the image frame. The brightness of the image frame is then adjusted according to this brightness adjustment coefficient. This method considers both energy saving by utilizing the battery SOC coefficient and adjusting the brightness of the corresponding image frame using the brightness adjustment coefficient determined by the battery SOC coefficient and the brightness gradient value of the image frame. This means that the brightness adjustment coefficients for different image frames may differ, enabling flexible adjustment of image frame brightness. Compared to related technologies that uniformly reduce the brightness of all image frames in an HDR video by a fixed ratio, resulting in some image frames being too dark and losing detail, the brightness adjustment method in this application determines a brightness adjustment coefficient for each image frame in the HDR video. This allows for adjustment of the brightness of the corresponding image frame based on the determined brightness adjustment coefficient, adapting to different image frames and preventing excessively dark image frames. The details of each image frame are well displayed, improving the display quality of the image frame after brightness adjustment.

[0067] The following section provides a more detailed description of this application with reference to application examples.

[0068] This application example provides a brightness adjustment method for an electronic device, such as a media player installed on a mobile terminal, including the following steps: Step 1: Before displaying the HDR video (which can be understood as an HDR video file), obtain the protocol format and EOTF information of the HDR video from its metadata; based on the EOTF information and the protocol format of the HDR video, determine the correspondence between the pixel values ​​and luminance values ​​of the HDR video.

[0069] HDR video consists of m frames of images.

[0070] Step 2: Based on the correspondence between pixel values ​​and brightness values ​​in HDR videos, determine the correspondence between pixel values ​​and brightness gradient values ​​in HDR videos.

[0071] Step 3: Based on the correspondence between pixel values ​​and brightness gradient values, and the pixel values ​​of each pixel in the image frame, determine the brightness gradient value corresponding to each pixel in the image frame.

[0072] Step 4: For each image frame in the HDR video, determine the mean value of the brightness gradient value of the image frame based on the brightness gradient value corresponding to each pixel of the image frame.

[0073] Step 5: Determine the reciprocal of the mean of the brightness gradient values ​​of the image frame as the first coefficient; input the first coefficient and the battery SOC coefficient into the model for processing to obtain the brightness adjustment coefficient of the image frame.

[0074] Step 6: Use a filter to smooth the brightness adjustment coefficient sequence Q1-Qm corresponding to the HDR video (this can be understood as smoothing filtering) to obtain the processed coefficients.

[0075] Step 7: Multiply the processed coefficient by the original display brightness of the corresponding image frame to obtain the adjusted display brightness. Use the adjusted display brightness to display the image frame to complete the brightness adjustment of the HDR video.

[0076] Step 8: Display the HDR video after adjusting the brightness.

[0077] The brightness adjustment method in this application example determines the brightness adjustment coefficient for each image frame based on the brightness gradient information of each image frame in the HDR video and the current battery SOC coefficient. When displaying each image frame of the HDR video, the brightness of each frame can be adjusted according to its corresponding brightness adjustment coefficient. This solves the problem in related technologies where uniformly lowering the brightness results in many video details being difficult for users to see, leading to poor display quality. Since the brightness gradient value reflects the amount of brightness redundancy information in each image frame, the brightness value of each image frame can be adjusted based on this redundancy, allowing for more reasonable brightness adjustment. While achieving energy saving, the method also displays each image frame more flexibly based on the magnitude of brightness redundancy, ensuring detailed display of each frame and improving display quality.

[0078] To implement the brightness adjustment method provided in this application embodiment, this application embodiment also provides a brightness adjustment device, such as... Figure 3 As shown, the device includes: The first determining module 301 is used to determine the brightness gradient value corresponding to each pixel of each image frame in the HDR video; the brightness gradient value is used to reflect the brightness change between the pixel value and the adjacent pixel value; and to obtain the battery SOC coefficient of the device used to display the image frame. The second determining module 302 is used to determine the brightness adjustment coefficient of the image frame based on the brightness gradient value corresponding to each pixel of the image frame and the battery SOC coefficient. The adjustment module 303 is used to adjust the brightness of the image frame based on the brightness adjustment coefficient.

[0079] In some optional embodiments, the second determining module 302 is specifically used for: A first coefficient is determined based on the brightness gradient value corresponding to each pixel of the image frame; the first coefficient is used to reflect the amount of brightness redundancy information in the image frame. The first coefficient and the battery SOC coefficient are input into the model for processing to obtain the brightness adjustment coefficient of the image frame; the model is used to output the brightness adjustment coefficient based on the first coefficient and the battery SOC coefficient.

[0080] In some optional embodiments, the second determining module 302 is specifically used for: The mean value of the brightness gradient of the image frame is determined based on the brightness gradient value corresponding to each pixel of the image frame. The first coefficient is determined by taking the reciprocal of the mean of the brightness gradient values ​​of the image frames.

[0081] In some optional embodiments, the second determining module 302 is specifically used for: Input the first coefficient and the battery SOC coefficient into the model; The first value is obtained by weighted summation of the first coefficient and the battery SOC coefficient using the model; and the brightness adjustment coefficient of the image frame is determined based on the first value. The brightness adjustment coefficient of the image frame is obtained by outputting the brightness adjustment coefficient of the image frame through the model.

[0082] In some optional embodiments, the first determining module 301 is specifically used to determine the brightness gradient value corresponding to each pixel of the image frame based on the correspondence between pixel values ​​and brightness gradient values ​​and the pixel values ​​of each pixel of the image frame.

[0083] In some optional embodiments, the first determining module 301 is specifically used for: For the r-th pixel in an image frame, determine the brightness value corresponding to the pixel value of the r-th pixel, and the brightness value corresponding to the pixel value of the r-th pixel minus 1; where the image frame contains n pixels, r is an integer greater than 1 and less than or equal to n, and n is an integer greater than 1; The brightness gradient value of the r-th pixel is determined based on the brightness value corresponding to the pixel value of the r-th pixel and the brightness value corresponding to the pixel value of the r-th pixel minus 1.

[0084] In some alternative embodiments, the apparatus further includes a processing module; The processing module is used to smooth the brightness adjustment coefficients of each image frame to obtain the processed coefficients. The adjustment module 303 is specifically used to adjust the brightness of the image frame based on the processed coefficients.

[0085] In practical applications, the first determining module 301, the second determining module 302, the adjusting module 303, and the processing module can be implemented by the processor in the brightness adjusting device.

[0086] It should be noted that the brightness adjustment device provided in the above embodiments is only illustrated by the division of the above-described program modules. In practical applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device can be divided into different program modules to complete all or part of the processing described above. In addition, the brightness adjustment device and the brightness adjustment method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.

[0087] Based on the hardware implementation of the above program modules, and in order to implement the brightness adjustment method provided in this application embodiment, this application embodiment also provides an electronic device, such as... Figure 4 As shown, the electronic device 400 includes: Communication interface 401 enables information exchange with other devices; The processor 402 is connected to the communication interface 401 to enable information interaction with other devices and to execute the methods provided by one or more of the above-mentioned technical solutions when running a computer program; The computer program is stored in the memory 403.

[0088] Specifically, the processor 402 is configured to determine the brightness gradient value corresponding to each pixel of each image frame in the HDR video; the brightness gradient value is used to reflect the brightness change between the pixel value and the adjacent pixel values; and obtain the battery SOC coefficient of the device used to display the image frame; determine the brightness adjustment coefficient of the image frame based on the brightness gradient value corresponding to each pixel of the image frame and the battery SOC coefficient; and adjust the brightness of the image frame based on the brightness adjustment coefficient.

[0089] In some alternative embodiments, the processor 402 is specifically used for: A first coefficient is determined based on the brightness gradient value corresponding to each pixel of the image frame; the first coefficient is used to reflect the amount of brightness redundancy information in the image frame. The first coefficient and the battery SOC coefficient are input into the model for processing to obtain the brightness adjustment coefficient of the image frame; the model is used to output the brightness adjustment coefficient based on the first coefficient and the battery SOC coefficient.

[0090] In some alternative embodiments, the processor 402 is specifically used for: The mean value of the brightness gradient of the image frame is determined based on the brightness gradient value corresponding to each pixel of the image frame. The first coefficient is determined by taking the reciprocal of the mean of the brightness gradient values ​​of the image frames.

[0091] In some alternative embodiments, the processor 402 is specifically used for: Input the first coefficient and the battery SOC coefficient into the model; The first value is obtained by weighted summation of the first coefficient and the battery SOC coefficient using the model; and the brightness adjustment coefficient of the image frame is determined based on the first value. The brightness adjustment coefficient of the image frame is obtained by outputting the brightness adjustment coefficient of the image frame through the model.

[0092] In some optional embodiments, the processor 402 is specifically used to determine the brightness gradient value corresponding to each pixel of the image frame based on the correspondence between pixel values ​​and brightness gradient values, and the pixel values ​​of each pixel of the image frame.

[0093] In some alternative embodiments, the processor 402 is specifically used for: For the r-th pixel in an image frame, determine the brightness value corresponding to the pixel value of the r-th pixel, and the brightness value corresponding to the pixel value of the r-th pixel minus 1; where the image frame contains n pixels, r is an integer greater than 1 and less than or equal to n, and n is an integer greater than 1; The brightness gradient value of the r-th pixel is determined based on the brightness value corresponding to the pixel value of the r-th pixel and the brightness value corresponding to the pixel value of the r-th pixel minus 1.

[0094] In some optional embodiments, the processor 402 is further configured to: The brightness adjustment coefficients of each image frame are smoothed to obtain the processed coefficients; The brightness of the image frame is adjusted based on the processed coefficients.

[0095] It should be noted that the specific processing procedure of processor 402 can be understood by referring to the above method.

[0096] Of course, in practical applications, the various components in electronic device 400 are coupled together through bus system 404. It can be understood that bus system 404 is used to realize the connection and communication between these components. In addition to a data bus, bus system 404 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, in... Figure 4 The general designated all buses as Bus System 404.

[0097] The memory 403 in this embodiment is used to store various types of data to support the operation of the electronic device 400. Examples of such data include any computer program used to operate on the electronic device 400.

[0098] The methods disclosed in the embodiments of this application can be applied to the processor 402, or implemented by the processor 402. The processor 402 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in the processor 402 or by instructions in the form of software. The processor 402 may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 402 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the methods disclosed in the embodiments of this application can be directly reflected as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium, which is located in the memory 403. The processor 402 reads the information in the memory 403 and combines its hardware to complete the steps of the aforementioned method.

[0099] In an exemplary embodiment, the electronic device 400 may be implemented by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers (MCUs), microprocessors, or other electronic components to perform the aforementioned method.

[0100] It is understood that the memory 403 in this embodiment can be volatile memory or non-volatile memory, or both. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), ferromagnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM); magnetic surface memory can be disk storage or magnetic tape storage. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), SyncLink Dynamic Random Access Memory (SLDRAM), and Direct Rambus Random Access Memory (DRRAM).The memory 403 described in the embodiments of this application is intended to include, but is not limited to, these and any other suitable types of memory.

[0101] This application embodiment also provides a storage medium, namely a computer storage medium, specifically a computer-readable storage medium, such as a memory 403 that stores a computer program. The computer program can be executed by the processor 402 of the electronic device 400 to complete the steps described in the preceding method. The computer-readable storage medium can be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface memory, optical disc, or CD-ROM.

[0102] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above methods.

[0103] It should be noted that terms such as "first" and "second" are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. The term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone.

[0104] Furthermore, the technical solutions described in the embodiments of this application can be combined arbitrarily without conflict.

[0105] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application.

Claims

1. A brightness adjustment method, characterized in that, The method includes: For each image frame in a high dynamic range (HDR) video, determine the brightness gradient value corresponding to each pixel of the image frame; the brightness gradient value is used to reflect the brightness change between the pixel value and the values ​​of adjacent pixels; and obtain the state of charge (SOC) coefficient of the battery of the device used to display the image frame. The brightness adjustment coefficient of the image frame is determined based on the brightness gradient value corresponding to each pixel of the image frame and the battery SOC coefficient. The brightness of the image frame is adjusted based on the brightness adjustment coefficient.

2. The method according to claim 1, characterized in that, The determination of the brightness adjustment coefficient of the image frame based on the brightness gradient value corresponding to each pixel of the image frame and the battery SOC coefficient includes: A first coefficient is determined based on the brightness gradient value corresponding to each pixel of the image frame; the first coefficient is used to reflect the amount of brightness redundancy information in the image frame. The first coefficient and the battery SOC coefficient are input into the model for processing to obtain the brightness adjustment coefficient of the image frame; the model is used to output the brightness adjustment coefficient based on the first coefficient and the battery SOC coefficient.

3. The method according to claim 2, characterized in that, The determination of the first coefficient based on the brightness gradient values ​​corresponding to each pixel of the image frame includes: The mean value of the brightness gradient of the image frame is determined based on the brightness gradient value corresponding to each pixel of the image frame. The first coefficient is determined by taking the reciprocal of the mean of the brightness gradient values ​​of the image frames.

4. The method according to claim 2, characterized in that, The step of inputting the first coefficient and the battery SOC coefficient into the model for processing to obtain the brightness adjustment coefficient of the image frame includes: Input the first coefficient and the battery SOC coefficient into the model; The model performs a weighted summation of the first coefficient and the battery SOC coefficient to obtain a first value; and based on the first value, the brightness adjustment coefficient of the image frame is determined. The brightness adjustment coefficient of the image frame is obtained by outputting the brightness adjustment coefficient of the image frame through the model.

5. The method according to any one of claims 1 to 4, characterized in that, Determining the brightness gradient value corresponding to each pixel of the image frame includes: Based on the correspondence between pixel values ​​and brightness gradient values, and the pixel values ​​of each pixel in the image frame, the brightness gradient value corresponding to each pixel in the image frame is determined.

6. The method according to any one of claims 1 to 4, characterized in that, Determining the brightness gradient value corresponding to each pixel of the image frame includes: For the r-th pixel in an image frame, determine the brightness value corresponding to the pixel value of the r-th pixel, and the brightness value corresponding to the pixel value of the r-th pixel minus 1; where the image frame contains n pixels, r is an integer greater than 1 and less than or equal to n, and n is an integer greater than 1; The brightness gradient value of the r-th pixel is determined based on the brightness value corresponding to the pixel value of the r-th pixel and the brightness value corresponding to the pixel value of the r-th pixel minus 1.

7. The method according to any one of claims 1 to 4, characterized in that, The method further includes: The brightness adjustment coefficients of each image frame are smoothed to obtain the processed coefficients; The brightness of the image frame is adjusted based on the processed coefficients.

8. An electronic device, characterized in that, This includes a processor and memory for storing computer programs that can run on the processor. When the processor is used to run the computer program, it performs the steps of the method according to any one of claims 1 to 7.

9. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.