Method and device for backlight adjustment
By dividing the image area in a low-brightness scene and adjusting the backlight based on the pixel color value, the problem that SPF technology cannot achieve local backlight adjustment is solved, realizing dynamic visual contrast adjustment and preservation of dark details, thus improving the user experience.
Patent Information
- Application Number
- CN202411907946.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2044-12-20
AI Technical Summary
In existing technologies, SPF technology cannot achieve local backlight adjustment, resulting in incompatibility between different scene contents in low-brightness images, which reduces the contrast perception for viewers and lowers the user experience.
When a low-brightness scene is detected, the image is divided into multiple regions, the dark areas of the image with low brightness are identified, and the backlight adjustment type and adjustment coefficient are determined based on the color value of the pixel. Local backlight brightening or darkening is then adjusted to dynamically adjust the visual contrast.
It achieves compatibility between different scene contents in low-brightness images, preserves details in dark areas, improves visual contrast, and alleviates the visual problems caused by the inability of SPF technology to achieve local backlight adjustment.
Smart Images

Figure CN119649766B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of display technology, and more particularly to a method and apparatus for backlight adjustment. Background Technology
[0002] Nowadays, in order to provide consumers with a better viewing experience when watching TV, TV manufacturers have added local dimming (LD) to their mid-to-high-end models.
[0003] LD (Light Dimming) function means that the backlight of the display product is evenly divided into several areas, and the backlight of each zone can be intelligently adjusted in real time according to the content of the picture, thereby achieving two purposes: energy saving and improving picture contrast. Depending on the product size and the main chip hardware capabilities, today's products range from dozens to tens of thousands of zones. Due to the differences in module design and liquid crystal light transmittance, halo phenomenon is unavoidable regardless of the number of zones. Generally speaking, more zones mean more precise light control and less halo. However, the number of zones depends on hardware performance, cost, and product positioning. Therefore, the halo phenomenon cannot be solved by increasing the number of backlight zones indefinitely.
[0004] In existing technologies, special filter (SPF) technology can be used to reduce halo effects, but it cannot be compatible with various low-brightness scenes. For example, in a dark night sky scene with no detail, the contrast will be higher as the scene becomes darker. SPF technology is used to reduce the backlight of the entire scene to achieve this. However, when there is a tree full of detail under night light, SPF technology is used to increase the backlight of the entire scene to make the details visible. This method of adjusting the backlight using SPF technology cannot achieve local backlight adjustment, which makes different scene contents incompatible in low-brightness scenes. This can easily cause the viewer's contrast perception to be compromised, thereby reducing the user experience. Summary of the Invention
[0005] In view of this, in order to effectively alleviate the technical problem that the existing SPF technology cannot achieve local backlight adjustment, resulting in incompatibility between different scene contents in low-brightness images, which easily leads to a loss of contrast perception for viewers and thus reduces the user experience, the present invention provides a method and apparatus for backlight adjustment.
[0006] In a first aspect, embodiments of the present invention provide a method for backlight adjustment, the method comprising:
[0007] When the current image is detected as a low-brightness scene, the current image is divided into multiple image regions; each image region corresponds to a backlight area.
[0008] Each dark area in an image is identified from multiple image regions; where each dark area is an image region with low brightness.
[0009] For each dark area of the image, perform the following: obtain the color value of each pixel in the dark area of the image;
[0010] The backlight adjustment type and backlight adjustment coefficient of the dark area of the image are determined based on the color value of each pixel in the dark area of the image; wherein, the backlight adjustment type is either the first backlight adjustment type that needs to brighten the backlight or the second backlight adjustment type that needs to darken the backlight.
[0011] Backlight adjustment is performed on the backlight area corresponding to the dark area of the image based on the backlight adjustment type and backlight adjustment coefficient.
[0012] In one possible implementation, detecting that the current image belongs to a low-brightness scene includes:
[0013] Get the grayscale range of the current image;
[0014] Divide the grayscale value range into multiple equally spaced grayscale value sub-ranges;
[0015] Count the number of pixels in each grayscale value range;
[0016] From multiple grayscale value sub-ranges, determine multiple target grayscale value sub-ranges whose grayscale values do not exceed a preset grayscale threshold;
[0017] The total number of the first pixel is determined based on the number of pixels corresponding to each target grayscale value sub-range;
[0018] The total number of the second pixel is determined based on the number of pixels corresponding to each grayscale sub-range and the preset ratio of the number of pixels.
[0019] Determine whether the total amount of the first pixel is equal to or greater than the total amount of the second pixel;
[0020] If the total number of the first pixel is equal to or greater than the total number of the second pixel, the current image is detected as a low-brightness image.
[0021] In one possible implementation, determining individual dark areas from multiple image regions includes:
[0022] For each image region, perform the following operation: obtain the grayscale value of each pixel in the image region;
[0023] The average gray level of the region is determined based on the gray level of each pixel.
[0024] Determine whether the average grayscale value of the region is less than or equal to the preset grayscale threshold;
[0025] If the average gray level of the region is less than or equal to a preset gray level threshold, the image region is defined as a dark area.
[0026] In one possible implementation, determining the backlight adjustment type and backlight adjustment coefficient for the dark areas of the image based on the color values of each pixel in the dark area includes:
[0027] Calculate the absolute color difference between any two adjacent pixels based on the color values of each pixel in the dark area of the image;
[0028] Determine whether the absolute difference between each color is greater than a preset color difference threshold;
[0029] If at least one absolute color difference is determined to be greater than a preset color difference threshold, the backlight adjustment type of the dark area of the image is determined to be the first backlight adjustment type, and the first backlight adjustment coefficient of the dark area of the image is determined based on at least one absolute color difference that is greater than the preset color difference threshold.
[0030] If the absolute difference of each color is determined to be less than or equal to the preset color difference threshold, the absolute color difference value of each pixel is calculated based on the color value of each pixel.
[0031] Determine whether the absolute color difference value of each pixel is greater than a preset color difference value threshold;
[0032] If the absolute color difference value of at least one pixel is greater than a preset color difference value threshold, the backlight adjustment type of the dark area of the image is determined to be a first backlight adjustment type, and a second backlight adjustment coefficient of the dark area of the image is determined based on at least one absolute color difference value that is greater than the preset color difference value threshold.
[0033] If the absolute color difference value of each pixel is less than or equal to the preset color difference value threshold, the backlight adjustment type of the dark area of the image is determined to be the second backlight adjustment type, and the third backlight adjustment coefficient of the dark area of the image is determined based on the color value of each pixel.
[0034] In one possible implementation, determining the backlight adjustment coefficient for the dark areas of the image based on at least one absolute color difference greater than a preset color difference threshold includes:
[0035] Select the largest target color absolute difference from at least one color absolute difference that is greater than a preset color difference threshold;
[0036] The backlight adjustment coefficient corresponding to the absolute difference of the target color is retrieved from the first backlight adjustment coefficient lookup table; wherein, the first backlight adjustment coefficient lookup table stores the correspondence between the absolute difference of the color and the backlight adjustment coefficient;
[0037] The backlight adjustment coefficient corresponding to the absolute difference of the target color is determined as the first backlight adjustment coefficient for the dark area of the image.
[0038] In one possible implementation, the absolute color difference values include the absolute color difference values of the red-green channel, the absolute color difference values of the red-blue channel, and the absolute color difference values of the blue-green channel;
[0039] Determine whether the absolute color difference value of each pixel is greater than a preset color difference value threshold, including:
[0040] Determine whether the absolute color difference value of the red and green channels of each pixel is greater than a preset red-green difference threshold, or whether the absolute color difference value of the red and blue channels is greater than a preset red-blue difference threshold, or whether the absolute color difference value of the blue and green channels is greater than a preset blue-green difference threshold.
[0041] A second backlight adjustment coefficient for the dark area of the image is determined based on at least one absolute color difference value greater than a preset color difference threshold, including:
[0042] Select the largest target color absolute difference value from at least one color absolute difference value that is greater than a preset color difference value threshold;
[0043] The backlight adjustment coefficient corresponding to the absolute difference value of the target color is retrieved from the second backlight adjustment coefficient lookup table; the second backlight adjustment coefficient lookup table stores the correspondence between the absolute difference value of the color and the backlight adjustment coefficient.
[0044] The backlight adjustment coefficient corresponding to the absolute difference value of the target color is determined as the second backlight adjustment coefficient for the dark area of the image.
[0045] In one possible implementation, the color values include red, green, and blue color values;
[0046] The third backlight adjustment coefficient for the dark areas of the image is determined based on the color values of each pixel, including:
[0047] Determine whether the red, green, and blue color values corresponding to each pixel are all equal to the preset color threshold;
[0048] If the red, green, and blue color values corresponding to each pixel are all equal to the preset color threshold, the total color value is determined based on the red, green, and blue color values.
[0049] Look up the backlight adjustment coefficient corresponding to the total color value from the third backlight adjustment coefficient lookup table; the third backlight adjustment coefficient lookup table stores the correspondence between the total color value and the backlight adjustment coefficient.
[0050] The backlight adjustment coefficient corresponding to the total color value is determined as the third backlight adjustment coefficient for the dark area of the image.
[0051] If it is determined that the red, green and blue color values corresponding to at least one pixel are not equal to the preset color threshold, the preset backlight adjustment coefficient is determined as the third backlight adjustment coefficient for the dark area of the image.
[0052] In one possible implementation, backlight adjustment is performed on the backlight area corresponding to the dark area of the image according to the backlight adjustment type and the backlight adjustment coefficient, including:
[0053] Obtain the backlight brightness value of the backlight area corresponding to the dark area of the image;
[0054] When the backlight adjustment type is the first backlight adjustment type, the backlight brightness value is determined based on the backlight brightness value and the first backlight adjustment coefficient, or based on the backlight brightness value and the second backlight adjustment coefficient, so that the backlight brightness value is adjusted according to the backlight brightness value.
[0055] When the backlight adjustment type is the second backlight adjustment type, the backlight dimming value is determined based on the backlight brightness value and the third backlight adjustment coefficient, so that the backlight brightness value is adjusted according to the backlight dimming value.
[0056] In one possible implementation, the method further includes:
[0057] Obtain the first backlight brightness value corresponding to each backlight area after backlight adjustment;
[0058] Determine whether each first backlight brightness value is equal to a preset backlight brightness threshold;
[0059] If it is determined that at least one backlight brightness value among the various backlight brightness values is equal to a preset backlight brightness threshold, then each of the at least one backlight brightness value equal to the preset backlight brightness threshold is used as a second backlight brightness value and the following operation is performed:
[0060] Obtain the third backlight brightness value of the adjacent backlight area that is adjacent to the backlight area corresponding to the second backlight brightness value;
[0061] The backlight brightness difference is determined based on the third backlight brightness value and the second backlight brightness value;
[0062] Determine whether the backlight brightness difference is greater than the preset backlight brightness threshold;
[0063] If the backlight brightness difference is determined to be greater than the preset backlight brightness threshold, the fourth backlight adjustment coefficient corresponding to the third backlight brightness value is retrieved from the fourth backlight adjustment coefficient lookup table; wherein, the fourth backlight adjustment coefficient lookup table stores the correspondence between the third backlight brightness value and the backlight adjustment coefficient.
[0064] The backlight dimming value is determined based on the third backlight brightness value and the fourth backlight adjustment coefficient, so that the third backlight brightness value is adjusted according to the backlight dimming value.
[0065] Secondly, embodiments of the present invention provide a backlight adjustment device, the device comprising:
[0066] The segmentation module is used to divide the current image into multiple image regions when it detects that the current image is a low-brightness scene; each image region corresponds to a backlight region.
[0067] The first determining module is used to determine each dark area of an image from multiple image regions; wherein each dark area of an image is an image region with low brightness;
[0068] The acquisition module is used to perform the following operation for each dark area of the image: acquire the color value of each pixel in the dark area of the image;
[0069] The second determining module is used to determine the backlight adjustment type and backlight adjustment coefficient of the dark area of the image based on the color value of each pixel in the dark area of the image; wherein, the backlight adjustment type is either the first backlight adjustment type that needs to brighten the backlight or the second backlight adjustment type that needs to darken the backlight.
[0070] The backlight adjustment module is used to adjust the backlight of the backlight area corresponding to the dark area of the image according to the backlight adjustment type and backlight adjustment coefficient.
[0071] Thirdly, embodiments of the present invention provide an electronic device, comprising: a processor and a memory, wherein the processor is configured to execute a backlight adjustment program stored in the memory to implement the aforementioned backlight adjustment method.
[0072] Fourthly, embodiments of the present invention provide a storage medium, wherein the storage medium stores one or more programs, which can be executed by one or more processors to implement the aforementioned backlight adjustment method.
[0073] The backlight adjustment method and apparatus provided in this invention include: when detecting that the current image is a low-brightness image, dividing the current image into multiple image regions; wherein each image region corresponds to a backlight region; determining each image dark region from the multiple image regions; wherein each image dark region is an image region with low brightness; for each image dark region, performing the following: obtaining the color value of each pixel in the image dark region; determining the backlight adjustment type and backlight adjustment coefficient of the image dark region based on the color value of each pixel in the image dark region; wherein the backlight adjustment type is a first backlight adjustment type that needs to brighten the backlight or a second backlight adjustment type that needs to darken the backlight; and adjusting the backlight of the backlight region corresponding to the image dark region according to the backlight adjustment type and the backlight adjustment coefficient. The above-mentioned technical solution can adjust the backlight of the backlight area by darkening or brightening it according to the backlight adjustment type of each dark area in the low-brightness picture. This enables local adjustment of the backlight to dynamically adjust the visual contrast, retain more dark details, and make different scene content compatible in low-brightness pictures. Compared with the existing SPF technology for adjusting backlight, it can effectively alleviate the technical problem that the SPF technology cannot achieve local backlight adjustment, which makes different scene content incompatible in low-brightness pictures, easily causing the viewer's contrast perception to be compromised, and thus reducing the user experience. Attached Figure Description
[0074] Figure 1 A flowchart illustrating an embodiment of a backlight adjustment method provided by the present invention;
[0075] Figure 2 A flowchart illustrating another embodiment of a backlight adjustment method provided by the present invention;
[0076] Figure 3 A flowchart illustrating another embodiment of a backlight adjustment method provided by the present invention;
[0077] Figure 4 A flowchart illustrating another embodiment of a backlight adjustment method provided by the present invention;
[0078] Figure 5 A flowchart illustrating another embodiment of a backlight adjustment method provided by the present invention;
[0079] Figure 6 A flowchart illustrating another embodiment of a backlight adjustment method provided by the present invention;
[0080] Figure 7 A block diagram illustrating an embodiment of a backlight adjustment device provided in this invention;
[0081] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0082] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0083] To facilitate understanding of the embodiments of the present invention, further explanations and descriptions will be provided below with reference to the accompanying drawings and specific embodiments. These embodiments do not constitute a limitation on the embodiments of the present invention.
[0084] This invention provides a backlight adjustment method, applicable to terminal devices with added LD (Light Dimming) functionality, such as monitors, televisions, and all-in-one conference machines, but not limited thereto. See also Figure 1 , Figure 1 This is a flowchart illustrating an embodiment of a backlight adjustment method provided by the present invention. Figure 1 The process shown may include the following steps:
[0085] Step 101: When the current image is detected to be a low-brightness scene, the current image is divided into multiple image regions; where each image region corresponds to a backlight region.
[0086] In this embodiment, in order to effectively solve the technical problem that existing SPF technology cannot achieve local backlight adjustment in low-brightness images, resulting in incompatibility between different scene contents in low-brightness images, it is necessary to perform local backlight adjustment according to the backlight adjustment method proposed in this embodiment only when the current image is detected to be a low-brightness image.
[0087] Specifically, when the current image is detected to be a low-brightness scene, the current image is divided into multiple image regions according to the number of partitions of the backlight area, so as to facilitate subsequent local backlight adjustment. It can be understood that there is a one-to-one correspondence between the image regions and the backlight areas. The actual number of image regions divided depends on the number of backlight areas. Here, the number of image regions is not limited.
[0088] Step 102: Determine each dark area of the image from multiple image regions;
[0089] Among them, each dark area of the image is an image area with low brightness; in order to improve visual contrast and retain more dark details so that different scene content can be compatible in low-brightness images, it is necessary to determine each dark area of the image from multiple image areas so as to perform dynamic backlight adjustment on the backlight area corresponding to each dark area of the image to brighten or darken the backlight.
[0090] Step 103: For each dark area of the image, perform the following: obtain the color value of each pixel in the dark area of the image;
[0091] The color values mentioned above are the color information of pixels in the dark areas of the image, which are represented by the values of the three color channels: red (R), green (G), and blue (B).
[0092] Step 104: Determine the backlight adjustment type and backlight adjustment coefficient for the dark areas of the image based on the color values of each pixel;
[0093] The backlight adjustment type is either the first backlight adjustment type, which requires brightening the backlight, or the second backlight adjustment type, which requires darkening the backlight. This can be understood as follows: if the backlight adjustment type is the first backlight adjustment type, it indicates that there are details in the dark areas of the image that need to be displayed. Therefore, the backlight in the dark areas of the image needs to be brightened to highlight the details. If the backlight adjustment type is the second backlight adjustment type, it indicates that there are no details in the dark areas of the image that need to be displayed. Therefore, the backlight in the dark areas of the image needs to be darkened to improve the visual contrast of the dark areas of the image that can highlight the details while reducing the halo effect.
[0094] The backlight adjustment coefficient is a quantitative indicator of the degree of backlight dimming or brightening. Through this backlight adjustment coefficient, the backlight area corresponding to the dark area of the image can be accurately adjusted to achieve the purpose of dynamic backlight adjustment.
[0095] Step 105: Adjust the backlight of the backlight area corresponding to the dark area of the image according to the backlight adjustment type and backlight adjustment coefficient.
[0096] As described above, since the backlight adjustment types corresponding to the dark areas of each image are different, the backlight areas corresponding to the dark areas of each image are adjusted by backlight adjustment coefficients to darken or brighten the backlight, so as to improve the visual contrast between the dark areas of each image, realize the local adjustment of the backlight, achieve dynamic adjustment of visual contrast, retain more dark details, and make different scene contents compatible in low-brightness images.
[0097] The backlight adjustment method provided in this invention can adjust the backlight area by darkening or brightening it according to the backlight adjustment type of each dark area in a low-brightness image. This enables local adjustment of the backlight to dynamically adjust the visual contrast, retain more details in the dark areas, and ensure compatibility of different scene content in low-brightness images. Compared with the existing SPF technology for adjusting backlight, this method effectively alleviates the technical problem that SPF technology cannot achieve local backlight adjustment, which leads to incompatibility of different scene content in low-brightness images, easily causing a loss of contrast perception for viewers and thus reducing the user experience.
[0098] like Figure 2 As shown, as an optional implementation, the method described above, step 101, detecting that the current image belongs to a low-brightness scene, includes the following steps:
[0099] Step 201: Obtain the grayscale value range of the current image;
[0100] In practical applications, the grayscale value range of the current image is related to the color depth display technology. For example, if the color depth display technology is 10-bit, the grayscale value range of the current image is 0-1023; if the color depth display technology is 8-bit, the grayscale value range of the current image is 0-255; and if the color depth display technology is 6-bit, the grayscale value range of the current image is 0-63. Since the current color depth display technology is the most widely used technology, we will take the color depth display technology as an example below, and the grayscale value range of the current image is 0-1023.
[0101] Step 202: Divide the grayscale value range into multiple equally spaced grayscale value sub-ranges;
[0102] To improve processing efficiency and accuracy, in this embodiment, the grayscale value range can be divided into multiple equally spaced grayscale value sub-ranges according to a preset number of divisions. For example, if the preset number of divisions is 32, the grayscale value range of 0-1023 is divided into 32 equal grayscale value sub-ranges, meaning each grayscale value sub-range includes 32 grayscale levels. Therefore, the resulting grayscale value sub-ranges are 0-31, 32-63…992-1023. The number of grayscale value sub-ranges can be determined according to actual needs and is not limited here.
[0103] Step 203: Count the number of pixels in each grayscale value range;
[0104] Continuing from the previous example, we count the number of pixels in the current image whose grayscale values fall within the aforementioned 32 grayscale value ranges.
[0105] Step 204: Determine multiple target grayscale value sub-ranges from multiple grayscale value sub-ranges whose grayscale values do not exceed a preset grayscale threshold;
[0106] The preset grayscale threshold is a pre-defined grayscale value that represents a low-brightness image. For example, if the preset grayscale threshold is 160, then the five grayscale value sub-ranges of 0-31, 32-63, 64-95, 96-127, and 128-159 out of the above 32 grayscale value sub-ranges can be determined as the target grayscale value sub-ranges. Since the grayscale values in the grayscale value sub-ranges from 160-191 to 992-1023 exceed the preset grayscale threshold, the grayscale value sub-ranges from 160-191 to 992-1023 cannot be determined as the target grayscale value sub-ranges. In practical applications, the preset grayscale threshold can be set according to actual needs, and is not limited here.
[0107] Step 205: Determine the total number of first pixels based on the number of pixels corresponding to each target grayscale value sub-range;
[0108] The total number of pixels corresponding to each of the above target grayscale sub-ranges is added together to obtain the total number of first pixels.
[0109] Step 206: Determine the total number of second pixels based on the number of pixels corresponding to each grayscale sub-range and the preset number ratio;
[0110] The total number of pixels is obtained by adding the number of pixels corresponding to each grayscale sub-range and multiplying the result by a preset ratio. The preset ratio can be set to 80%, so the total number of pixels is 80% of the total number of pixels in each grayscale sub-range. The preset ratio can be set according to actual needs and is not limited here.
[0111] Step 207: Determine whether the total number of the first pixels is equal to or greater than the total number of the second pixels;
[0112] Step 208: If the total number of first pixels is equal to or greater than the total number of second pixels, the current image is detected as a low-brightness image.
[0113] If the total number of first pixels is equal to or greater than the total number of second pixels, it indicates that the number of pixels corresponding to gray values below the preset gray threshold is large, and the current image can be identified as a low-brightness image. If the total number of first pixels is less than the total number of second pixels, the current image is identified as not being a low-brightness image, and the backlight adjustment method provided in this embodiment is not required.
[0114] The method in this embodiment can detect whether the current image is a low-brightness scene based on the number of pixels falling within each grayscale value range, which improves the accuracy of image detection and lays the foundation for subsequent backlight adjustment.
[0115] like Figure 3As shown, as an optional implementation, the method described above, step 102 of determining each dark area of the image from multiple image regions includes the following steps:
[0116] Step 301: Perform the following operation for each image region: obtain the grayscale value of each pixel in the image region;
[0117] Step 302: Determine the average gray level of the region based on the gray level values of each pixel;
[0118] The average gray value of the image region is obtained by summing the gray values of each pixel in the image region and then averaging them.
[0119] Step 303: Determine whether the average gray value of the region is less than or equal to the preset gray value threshold;
[0120] The preset grayscale threshold is the same as the preset grayscale threshold in step 204 above.
[0121] Step 304: If the average gray value of the determination area is less than or equal to the preset gray value threshold, the image area is determined as the dark area of the image.
[0122] If the average gray value of the determination area is less than the preset gray value threshold, it indicates that the image area is a dark area with low brightness. If the average gray value of the determination area is greater than the preset gray value threshold, it indicates that the image area is not a dark area with low brightness.
[0123] The method in this embodiment can accurately determine whether an image region is a dark area by comparing the average gray value of the corresponding region with a preset gray value threshold, thereby improving the accuracy of image detection and laying the foundation for subsequent backlight adjustment.
[0124] like Figure 4 As shown, as an optional implementation, the method described above, step 104, determining the backlight adjustment type and backlight adjustment coefficient of the dark area of the image based on the color values of each pixel in the dark area of the image, includes the following steps:
[0125] Step 401: Calculate the absolute color difference between any two adjacent pixels based on the color values of each pixel in the dark area of the image;
[0126] Since the color value of a pixel includes red, green, and blue values, in this embodiment, the red, green, and blue values corresponding to each pixel in the dark area of the image are first added together to obtain the total color value. Then, the difference between the total color values corresponding to any two adjacent pixels in the dark area of the image is calculated, and the absolute value is taken to obtain the absolute color difference between any two adjacent pixels.
[0127] Step 402: Determine whether the absolute difference between each color is greater than the preset color difference threshold;
[0128] The preset color difference threshold is a pre-defined critical value for the absolute color difference that indicates the presence of detail in the dark areas of an image. If the absolute color difference is greater than the preset color difference threshold, it means that there is detail in the dark areas of the image; otherwise, it means that there is no detail in the dark areas of the image.
[0129] Step 403: If at least one absolute color difference is determined to be greater than a preset color difference threshold, the backlight adjustment type of the dark area of the image is determined to be the first backlight adjustment type, and the first backlight adjustment coefficient of the dark area of the image is determined based on at least one absolute color difference that is greater than the preset color difference threshold.
[0130] If one or more absolute color differences are greater than a preset color difference threshold, it indicates that there are details in the dark areas of the image. In order not to affect the display of dark details, it is necessary to brighten the backlight of the dark areas of the image to improve the visibility of dark details. Therefore, the backlight adjustment type of the dark areas of the image is determined to be the first backlight adjustment type that needs to be brightened.
[0131] Brightening the backlight in dark areas of an image can be achieved by appropriately increasing the backlight brightness of those areas using a determined first backlight adjustment coefficient. In this embodiment, the larger the absolute color difference, the larger the first backlight adjustment coefficient; conversely, the smaller the absolute color difference, the smaller the first backlight adjustment coefficient. The specific process of determining the first backlight adjustment coefficient can be implemented through steps A1 to A3:
[0132] Step A1: Select the largest target color absolute difference from at least one color absolute difference that is greater than a preset color difference threshold;
[0133] If there is only one absolute color difference greater than the preset color difference threshold, then that absolute color difference will be used as the target absolute color difference. If there are multiple absolute color differences greater than the preset color difference threshold, and there are also multiple largest absolute color differences, then the largest absolute color difference can be randomly selected as the target absolute color difference.
[0134] Step A2: Query the backlight adjustment coefficient corresponding to the absolute difference of the target color from the first backlight adjustment coefficient lookup table;
[0135] The first backlight adjustment coefficient lookup table stores the correspondence between absolute color differences and backlight adjustment coefficients; for ease of understanding, the first backlight adjustment coefficient lookup table is shown in Table 1:
[0136] Table 1
[0137] Absolute color difference Backlight adjustment coefficient 0-3 0 4-9 0.1 10-15 0.3 16-20 0.6 20-30 0.9 31 and above 1
[0138] It should be noted that Table 1 only shows an example of the correspondence between absolute color difference and backlight adjustment coefficient. The specific correspondence between absolute color difference and backlight adjustment coefficient can be set according to actual needs, and is not limited here.
[0139] Step A3: Determine the backlight adjustment coefficient corresponding to the absolute difference of the target color as the first backlight adjustment coefficient for the dark area of the image.
[0140] If the absolute difference of the target color is 8, it can be found from Table 1 that the first backlight adjustment coefficient corresponding to the dark area of the image is 0.1.
[0141] Step 404: If it is determined that the absolute difference of each color is less than or equal to the preset color difference threshold, calculate the absolute color difference value of each pixel based on the color value of each pixel.
[0142] If the absolute color difference is less than or equal to the preset color difference threshold, it means that the absolute color difference cannot directly reflect whether there is detail in the dark area of the image. In this case, it is necessary to further determine the absolute color difference based on the absolute color difference of each pixel.
[0143] The absolute color difference value includes the absolute color difference value of the red-green channel, the absolute color difference value of the red-blue channel, and the absolute color difference value of the blue-green channel. Therefore, the color value corresponding to each pixel needs to be obtained by taking the absolute value of the difference between the red color value and the green color value, the absolute value of the difference between the red color value and the blue color value, and the absolute value of the difference between the blue color value and the green color value.
[0144] Step 405: Determine whether the absolute color difference value of each pixel is greater than the preset color difference value threshold;
[0145] That is, it determines whether the absolute difference value of the red and green channels of each pixel is greater than the preset red-green difference threshold, or whether the absolute difference value of the red and blue channels is greater than the preset red-blue difference threshold, or whether the absolute difference value of the blue and green channels is greater than the preset blue-green difference threshold.
[0146] Step 406: If it is determined that the absolute color difference value of at least one pixel is greater than a preset color difference value threshold, the backlight adjustment type of the dark area of the image is determined to be the first backlight adjustment type, and the second backlight adjustment coefficient of the dark area of the image is determined based on at least one absolute color difference value that is greater than the preset color difference value threshold.
[0147] If the absolute color difference value of at least one pixel is greater than a preset color difference value threshold, that is, if the absolute color difference value of the red-green channel of one or more pixels is greater than the preset red-green difference threshold, or the absolute color difference value of the red-blue channel is greater than the preset red-blue difference threshold, or the absolute color difference value of the blue-green channel is greater than the preset blue-green difference threshold, then it is determined to be a detail that needs to be highlighted. In order not to affect the display of dark details, it is necessary to improve the visibility of dark areas. Therefore, the backlight adjustment type of the dark area of the image is determined to be the first backlight adjustment type that needs to be backlight brightened.
[0148] Brightening the backlight in dark areas of an image can be achieved by appropriately increasing the backlight brightness of those areas using a determined second backlight adjustment coefficient. In this embodiment, the larger the absolute color difference value, the larger the second backlight adjustment coefficient; conversely, the smaller the absolute color difference value, the smaller the second backlight adjustment coefficient. The specific process of determining the second backlight adjustment coefficient can be implemented through steps B1 to B3:
[0149] Step B1: Select the largest target color absolute difference value from at least one color absolute difference value that is greater than the preset color difference value threshold;
[0150] This can be understood as selecting the largest absolute color difference value from at least one absolute color difference value of the red-green channel, and / or the absolute color difference value of the red-blue channel, and / or the absolute color difference value of the blue-green channel that is greater than a preset color difference value threshold, as the target absolute color difference value.
[0151] Step B2: Look up the backlight adjustment coefficient corresponding to the absolute difference value of the target color from the second backlight adjustment coefficient lookup table;
[0152] The second backlight adjustment coefficient lookup table stores the correspondence between absolute color difference values and backlight adjustment coefficients. This second backlight adjustment coefficient lookup table is similar to the first backlight adjustment coefficient lookup table, and will not be described in detail here. It should be noted that the range of the backlight adjustment coefficient in the second backlight adjustment coefficient lookup table is also [0-1].
[0153] Step B3: Determine the backlight adjustment coefficient corresponding to the absolute difference value of the target color as the second backlight adjustment coefficient for the dark area of the image.
[0154] After determining the absolute difference value of the target color, the second backlight adjustment coefficient of the dark area of the image can be determined by querying the second backlight adjustment coefficient lookup table, so as to brighten the dark area of the image based on the second backlight adjustment coefficient.
[0155] Step 407: If the absolute color difference value of each pixel is less than or equal to the preset color difference value threshold, determine the backlight adjustment type of the dark area of the image as the second backlight adjustment type, and determine the third backlight adjustment coefficient of the dark area of the image based on the color value of each pixel.
[0156] If the absolute color difference value of each pixel is less than or equal to the preset color difference value threshold, it means that the absolute color difference value directly reflects that there is no detail in the dark area of the image. Therefore, the backlight adjustment type of the dark area of the image is determined to be the second backlight adjustment type that needs to be darkened. This will darken the backlight of the backlight area corresponding to the dark area of the image, thereby improving the visual contrast of the dark area of the image that highlights the details while reducing the halo effect.
[0157] Darkening the backlight in dark areas of an image can be achieved by appropriately reducing the backlight brightness of the corresponding dark areas through a determined third backlight adjustment coefficient. The specific process of determining the third backlight adjustment coefficient can be implemented through steps C1 to C5:
[0158] Step C1: Determine whether the red, green, and blue color values corresponding to each pixel are all equal to the preset color threshold.
[0159] That is, determine the red color value of each pixel = green color value = blue color value = preset color threshold.
[0160] Step C2: If the red, green, and blue color values corresponding to each pixel are all equal to the preset color threshold, determine the total color value based on the red, green, and blue color values.
[0161] If the red, green, and blue values corresponding to each pixel are all equal to a preset color threshold (i.e., red = green = blue = preset color threshold), then the dark areas of the image are grayscale fields. To improve visual contrast, a third backlight adjustment coefficient can be set to appropriately darken the backlight brightness corresponding to the dark areas of the image. The larger the red, green, and blue values, the larger the third backlight adjustment coefficient, and the lower the darkening degree; conversely, the smaller the third backlight adjustment coefficient, the stronger the darkening degree. Therefore, when the red, green, and blue values corresponding to each pixel are all equal to the preset color threshold, it is necessary to determine the total color value based on the red, green, and blue values to determine the third backlight adjustment coefficient.
[0162] Step C3: Query the backlight adjustment coefficient corresponding to the total color value from the third backlight adjustment coefficient lookup table;
[0163] The third backlight adjustment coefficient lookup table stores the correspondence between the total color value and the backlight adjustment coefficient. This third backlight adjustment coefficient lookup table is similar to the first backlight adjustment coefficient lookup table, and will not be described in detail here. It should be noted that the range of the backlight adjustment coefficient in the third backlight adjustment coefficient lookup table is also [0-1].
[0164] Step C4: Determine the backlight adjustment coefficient corresponding to the total color value as the third backlight adjustment coefficient for the dark area of the image;
[0165] After determining the total color value, the third backlight adjustment coefficient for the dark areas of the image can be determined by consulting the third backlight adjustment coefficient lookup table, so as to darken the dark areas of the image based on the third backlight adjustment coefficient.
[0166] Step C5: If it is determined that the red, green and blue color values corresponding to at least one pixel are not equal to the preset color threshold, the preset backlight adjustment coefficient is determined as the third backlight adjustment coefficient for the dark area of the image.
[0167] If the red, green, and blue color values corresponding to at least one pixel are not equal to the preset color threshold, it indicates that the dark area of the image is not a pure grayscale field. Therefore, in this embodiment, the backlight brightness of the backlight area corresponding to the dark area of the image needs to be directly adjusted to the preset backlight brightness value to darken the backlight. The preset backlight adjustment coefficient is related to the preset backlight brightness value. If the backlight brightness value is 0, then the preset backlight adjustment coefficient is 1. The specific preset backlight adjustment coefficient can be set according to actual needs and is not limited here.
[0168] like Figure 5 As shown, as an optional implementation, the method described above, step 105, which adjusts the backlight of the backlight area corresponding to the dark area of the image according to the backlight adjustment type and the backlight adjustment coefficient, includes the following steps:
[0169] Step 501: Obtain the backlight brightness value of the backlight area corresponding to the dark area of the image;
[0170] Step 502: When the backlight adjustment type is the first backlight adjustment type, determine the backlight brightness increase value based on the backlight brightness value and the first backlight adjustment coefficient, or based on the backlight brightness value and the second backlight adjustment coefficient, so as to adjust the backlight brightness value according to the backlight brightness increase value.
[0171] The formula for calculating the backlight brightness enhancement value is: backlight brightness value * first backlight adjustment coefficient or backlight brightness value * second backlight adjustment coefficient. Therefore, when it is necessary to enhance the backlight of the backlight area corresponding to the dark area of the image, the backlight brightness value needs to be adjusted upward based on the backlight brightness value. That is, the backlight brightness value after the backlight brightness enhancement value is increased is: backlight brightness value + backlight brightness enhancement value.
[0172] Step 503: When the backlight adjustment type is the second backlight adjustment type, determine the backlight dimming value based on the backlight brightness value and the third backlight adjustment coefficient, so as to adjust the backlight brightness value according to the backlight dimming value.
[0173] The formula for calculating the backlight dimming value is: backlight dimming value * third backlight adjustment coefficient. Therefore, when it is necessary to dim the backlight of the backlight area corresponding to the dark area of the image, the backlight brightness value needs to be adjusted downward based on the backlight brightness value. That is, the backlight brightness value after the backlight dimming value is adjusted downward is: backlight brightness value - backlight dimming value.
[0174] The method provided in this embodiment can accurately adjust the backlight brightness or darkness of the backlight area corresponding to the dark area of the image by using the backlight adjustment coefficient, so as to achieve the purpose of dynamically adjusting the backlight, improving the visual contrast between various dark areas of the image, realizing local adjustment of the backlight, and preserving more dark details so that different scene content can be compatible in low-brightness images.
[0175] exist Figure 1 Based on this, see Figure 6 , Figure 6 A flowchart illustrating another method for adjusting backlight provided in this invention. Figure 6 The process shown may include the following steps:
[0176] Step 601: When the current image is detected to be a low-brightness scene, the current image is divided into multiple image regions; wherein each image region corresponds to a backlight region;
[0177] Step 602: Determine each dark area of the image from multiple image regions; wherein each dark area of the image is an image region with low brightness;
[0178] Step 603: For each dark area of the image, perform the following: obtain the color value of each pixel in the dark area of the image;
[0179] Step 604: Determine the backlight adjustment type and backlight adjustment coefficient of the dark area of the image based on the color value of each pixel in the dark area of the image; wherein, the backlight adjustment type is either the first backlight adjustment type that needs to brighten the backlight or the second backlight adjustment type that needs to darken the backlight.
[0180] Step 605: Adjust the backlight of the backlight area corresponding to the dark area of the image according to the backlight adjustment type and backlight adjustment coefficient;
[0181] The processes of steps 601-605 are the same as those of steps 101-105, and will not be repeated here.
[0182] Step 606: Obtain the first backlight brightness value corresponding to each backlight area after backlight adjustment;
[0183] Step 607: Determine whether each first backlight brightness value is equal to a preset backlight brightness threshold.
[0184] The preset backlight brightness threshold can be set to a value such as 0, 1 or 2 to represent low backlight brightness. This preset backlight brightness threshold can be set according to actual needs and is not limited here.
[0185] Step 608: If it is determined that at least one backlight brightness value among the various backlight brightness values is equal to a preset backlight brightness threshold, then each of the at least one backlight brightness values equal to the preset backlight brightness threshold is used as a second backlight brightness value and the following operation is performed:
[0186] Step 609: Obtain the third backlight brightness value of the adjacent backlight region that is adjacent to the backlight region corresponding to the second backlight brightness value;
[0187] That is, to obtain the third backlight brightness value of each adjacent backlight area that is adjacent to the backlight area corresponding to the second backlight brightness value.
[0188] Step 610: Determine the backlight brightness difference based on the third backlight brightness value and the second backlight brightness value;
[0189] The difference between the third and second backlight brightness values is calculated to obtain the backlight brightness difference.
[0190] Step 611: Determine whether the backlight brightness difference is greater than the preset backlight brightness threshold.
[0191] The preset backlight brightness threshold is a pre-set critical value that represents a high-brightness area. The specific preset backlight brightness threshold can be set according to actual needs and is not limited here.
[0192] Step 612: If the backlight brightness difference is determined to be greater than the preset backlight brightness threshold, the fourth backlight adjustment coefficient corresponding to the third backlight brightness value is retrieved from the fourth backlight adjustment coefficient lookup table.
[0193] If the backlight brightness difference is greater than the preset backlight brightness threshold, it means that the adjacent backlight area is a high-brightness area, which will make the halo more obvious and is not conducive to visual contrast. Therefore, the backlight of the adjacent backlight area is darkened by the fourth backlight adjustment coefficient to achieve a better visual experience.
[0194] The fourth backlight adjustment coefficient lookup table stores the correspondence between the third backlight brightness value and the backlight adjustment coefficient. This fourth backlight adjustment coefficient lookup table is similar to the first backlight adjustment coefficient lookup table and will not be described in detail here. It should be noted that the range of the backlight adjustment coefficient in the fourth backlight adjustment coefficient lookup table is [0-255], and the default value is 255. The larger the third backlight brightness value, the smaller the fourth backlight adjustment coefficient, and the greater the degree of reduction in backlight brightness in adjacent backlight areas. Conversely, the larger the fourth backlight adjustment coefficient, the smaller the backlight adjustment range.
[0195] Step 613: Determine the backlight dimming value based on the third backlight brightness value and the fourth backlight adjustment coefficient, so as to adjust the backlight dimming value according to the third backlight brightness value.
[0196] The formula for calculating the backlight dimming value is: third backlight brightness value * fourth backlight adjustment coefficient. Therefore, when it is necessary to dim the backlight of adjacent backlight areas, the backlight brightness value needs to be adjusted downward based on the third backlight brightness value. That is, the third backlight brightness value after the backlight dimming value is adjusted is: third backlight brightness value - backlight dimming value.
[0197] The method provided in this embodiment can further darken the backlight of adjacent backlight areas when determining the bright adjacent backlight areas, so as to effectively reduce the halo phenomenon and achieve a better visual experience.
[0198] See Figure 7 This is a block diagram illustrating an embodiment of a backlight adjustment device provided by an embodiment of the present invention. Figure 7 As shown, the device includes:
[0199] The segmentation module 701 is used to divide the current image into multiple image regions when the current image is detected to be a low-brightness scene; wherein each image region corresponds to a backlight region;
[0200] The first determining module 702 is used to determine each dark area of an image from multiple image regions; wherein each dark area of an image is an image region with low brightness;
[0201] The acquisition module 703 is used to perform the following operation for each dark area of the image: acquire the color value of each pixel in the dark area of the image;
[0202] The second determining module 704 is used to determine the backlight adjustment type and backlight adjustment coefficient of the dark area of the image based on the color value of each pixel in the dark area of the image; wherein, the backlight adjustment type is either a first backlight adjustment type that needs to brighten the backlight or a second backlight adjustment type that needs to darken the backlight.
[0203] The backlight adjustment module 705 is used to adjust the backlight of the backlight area corresponding to the dark area of the image according to the backlight adjustment type and the backlight adjustment coefficient.
[0204] The backlight adjustment device provided in this invention can adjust the backlight area by darkening or brightening it according to the backlight adjustment type of each dark area in a low-brightness image. This enables local adjustment of the backlight to dynamically adjust the visual contrast, retain more details in the dark areas, and ensure compatibility of different scene content in low-brightness images. Compared with the existing SPF technology for adjusting backlight, this device effectively alleviates the technical problem that the inability of SPF technology to achieve local backlight adjustment leads to incompatibility of different scene content in low-brightness images, which can easily cause a loss of contrast perception for viewers and reduce the user experience.
[0205] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Figure 8 The illustrated electronic device 1200 includes at least one processor 1201, a memory 1202, at least one network interface 1204, and other user interfaces 1203. The various components in the electronic device 1200 are coupled together via a bus system 1205. It is understood that the bus system 1205 is used to implement communication between these components. In addition to a data bus, the bus system 1205 also includes a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 8 The general labeled all buses as Bus System 1205.
[0206] The user interface 1203 may include a display, keyboard, or clicking device (e.g., mouse, trackball, touchpad, or touchscreen).
[0207] It is understood that the memory 1202 in the embodiments of the present invention can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The 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), or flash memory. The 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), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate Synchronous DRAM (DDRSDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 1202 described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0208] In some implementations, memory 1202 stores elements, executable units or data structures, or subsets thereof, or extended sets thereof: operating system 12021 and application program 12022.
[0209] The operating system 12021 includes various system programs, such as the framework layer, core library layer, and driver layer, used to implement various basic business functions and handle hardware-based tasks. The application program 12022 includes various applications, such as a media player and a browser, used to implement various application functions. The program implementing the method of this embodiment can be included in the application program 12022.
[0210] In this embodiment of the invention, the processor 1201 executes the method steps provided in each method embodiment by calling the program or instructions stored in the memory 1202, specifically the program or instructions stored in the application program 12022.
[0211] The methods disclosed in the above embodiments of the present invention can be applied to processor 1201, or implemented by processor 1201. Processor 1201 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 processor 1201 or by instructions in the form of software. The processor 1201 may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of the present invention can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software units in the decoding processor. The software units may be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 1202. Processor 1201 reads the information in memory 1202 and completes the steps of the above method in conjunction with its hardware.
[0212] It is understood that the embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described herein, or combinations thereof.
[0213] For software implementation, the techniques described herein can be implemented by units that perform the functions described herein. The software code can be stored in memory and executed by a processor. The memory can be implemented in the processor or external to the processor.
[0214] The electronic device provided in this embodiment may be as follows: Figure 8 The electronic device shown can perform the following: Figure 1-6 All steps of the method for adjusting the backlight, thereby achieving Figure 1-6 For details on the technical effects of the backlight adjustment method shown, please refer to [link / reference]. Figure 1-6 The relevant descriptions are presented concisely and will not be elaborated upon here.
[0215] This invention also provides a storage medium (computer-readable storage medium). This storage medium stores one or more programs. The storage medium may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, hard disk, or solid-state drive; the memory may also include combinations of the above types of memory.
[0216] When one or more programs in the storage medium can be executed by one or more processors to achieve the above-mentioned backlight adjustment method.
[0217] The processor is used to execute a backlight adjustment program stored in the memory to implement the steps of the backlight adjustment method.
[0218] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0219] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented in hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0220] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method of backlight adjustment, characterized by, The method comprises: when detecting that the current image belongs to a low-light picture, dividing the current image into a plurality of image regions; wherein each image region corresponds to a backlight region; determining each image dark region from the plurality of image regions; wherein each image dark region is an image region with low brightness; for each image dark region, acquiring color values of each pixel point in the image dark region; determining a backlight adjustment type and a backlight adjustment coefficient of the image dark region based on the color values of each pixel point in the image dark region; wherein the backlight adjustment type is a first backlight adjustment type requiring brightening backlight or a second backlight adjustment type requiring darkening backlight; performing backlight adjustment on the backlight region corresponding to the image dark region according to the backlight adjustment type and the backlight adjustment coefficient; wherein the determination of the backlight adjustment type and the backlight adjustment coefficient of the image dark region based on the color values of each pixel point in the image dark region comprises: calculating color absolute difference values of any two adjacent pixel points based on the color values of each pixel point in the image dark region; determining whether each color absolute difference value is greater than a preset color difference threshold value; in a case where it is determined that at least one color absolute difference value is greater than the preset color difference threshold value, determining that the backlight adjustment type of the image dark region is the first backlight adjustment type, and determining a first backlight adjustment coefficient of the image dark region based on at least one color absolute difference value greater than the preset color difference threshold value; in a case where it is determined that each color absolute difference value is less than or equal to the preset color difference threshold value, calculating color absolute difference values of each pixel point based on the color values of each pixel point; determining whether each color absolute difference value of each pixel point is greater than a preset color difference threshold value; in a case where it is determined that at least one color absolute difference value of each pixel point is greater than the preset color difference threshold value, determining that the backlight adjustment type of the image dark region is the first backlight adjustment type, and determining a second backlight adjustment coefficient of the image dark region based on at least one color absolute difference value greater than the preset color difference threshold value; in a case where it is determined that each color absolute difference value of each pixel point is less than or equal to the preset color difference threshold value, determining that the backlight adjustment type of the image dark region is the second backlight adjustment type, and determining a third backlight adjustment coefficient of the image dark region based on the color values of each pixel point.
2. The method of claim 1, wherein, The detection that the current image belongs to a low-light picture comprises: acquiring a gray value range of the current image; dividing the gray value range into a plurality of equally spaced gray value subranges; counting the number of pixels in each gray value sub-range; determining a plurality of target gray value sub-ranges whose gray values do not exceed a preset gray threshold value from the plurality of gray value sub-ranges; determining a first total pixel amount based on the number of pixels corresponding to each target gray value sub-range; determining a second total pixel amount based on the number of pixels corresponding to each gray value sub-range and a preset quantity ratio; determining whether the first total pixel amount is equal to or greater than the second total pixel amount; In a case where the first total quantity of pixels is equal to or greater than the second total quantity of pixels, it is detected that the current image belongs to a low-brightness picture.
3. The method of claim 1, wherein, The determining of the image dark area from the multiple image areas comprises: For each of the image areas, the following operations are performed: obtaining a gray value of each pixel point in the image area; determining a regional gray mean value based on the gray value of each pixel point; determining whether the regional gray mean value is less than or equal to a preset gray threshold value; In a case where the regional gray mean value is less than or equal to the preset gray threshold value, the image area is determined as an image dark area.
4. The method of claim 1, wherein, The determining of the backlight adjustment coefficient of the image dark area based on at least one color absolute difference value greater than the preset color difference value threshold value comprises: selecting a maximum target color absolute difference value from at least one color absolute difference value greater than the preset color difference value threshold value; querying, from a first backlight adjustment coefficient query table, a backlight adjustment coefficient corresponding to the target color absolute difference value, wherein the first backlight adjustment coefficient query table stores a corresponding relationship between a color absolute difference value and a backlight adjustment coefficient; determining the backlight adjustment coefficient corresponding to the target color absolute difference value as a first backlight adjustment coefficient of the image dark area.
5. The method of claim 1, wherein, The color absolute difference value comprises a red-green color channel color absolute difference value, a red-blue color channel color absolute difference value, and a blue-green color channel color absolute difference value. The determining of whether the color absolute difference value of each pixel point is greater than a preset color difference value threshold value comprises: determining whether the red-green color channel color absolute difference value of each pixel point is greater than a preset red-green difference threshold value, or whether the red-blue color channel color absolute difference value is greater than a preset red-blue difference threshold value, or whether the blue-green color channel color absolute difference value is greater than a preset blue-green difference threshold value. The determining of a second backlight adjustment coefficient of the image dark area based on at least one color absolute difference value greater than the preset color difference value threshold value comprises: selecting a maximum target color absolute difference value from at least one color absolute difference value greater than the preset color difference value threshold value; querying, from a second backlight adjustment coefficient query table, a backlight adjustment coefficient corresponding to the target color absolute difference value, wherein the second backlight adjustment coefficient query table stores a corresponding relationship between a color absolute difference value and a backlight adjustment coefficient; determining the backlight adjustment coefficient corresponding to the target color absolute difference value as a second backlight adjustment coefficient of the image dark area.
6. The method of claim 1, wherein, The color value comprises a red color value, a green color value, and a blue color value. The determining of a third backlight adjustment coefficient of the image dark area based on the color value of each pixel point comprises: determining whether the red color value, the green color value, and the blue color value corresponding to each pixel point are all equal to a preset color threshold value; in a case where the red color value, the green color value, and the blue color value corresponding to each pixel point are all equal to the preset color threshold value, determining a color total value based on the red color value, the green color value, and the blue color value; query a backlight adjustment coefficient corresponding to the color total value from a third backlight adjustment coefficient query table, wherein the third backlight adjustment coefficient query table stores a corresponding relationship between color total values and backlight adjustment coefficients; determine the backlight adjustment coefficient corresponding to the color total value as the third backlight adjustment coefficient of the image dark area; determine the preset backlight adjustment coefficient as the third backlight adjustment coefficient of the image dark area in a case where it is determined that the red color value, the green color value and the blue color value corresponding to at least one of the pixel points are not equal to the preset color threshold value.
7. The method of claim 1, wherein, the backlight adjustment of the backlight area corresponding to the image dark area according to the backlight adjustment type and the backlight adjustment coefficient, comprising: obtaining a backlight brightness value of the backlight area corresponding to the image dark area; in a case where the backlight adjustment type is the first backlight adjustment type, determining a backlight brightening value based on the backlight brightness value and the first backlight adjustment coefficient, or determining the backlight brightening value based on the backlight brightness value and the second backlight adjustment coefficient, so as to perform backlight brightening adjustment on the backlight brightness value according to the backlight brightening value; in a case where the backlight adjustment type is the second backlight adjustment type, determining a backlight dimming value based on the backlight brightness value and the third backlight adjustment coefficient, so as to perform backlight dimming adjustment on the backlight brightness value according to the backlight dimming value.
8. The method of claim 1, wherein, the method further comprises: obtaining a first backlight brightness value corresponding to each of the backlight regions after the backlight adjustment; determining whether each of the first backlight brightness values is equal to a preset backlight brightness threshold value; in a case where it is determined that at least one of the backlight brightness values is equal to the preset backlight brightness threshold value, taking each of the at least one of the backlight brightness values equal to the preset backlight brightness threshold value as a second backlight brightness value and performing the following operations: obtaining a third backlight brightness value of an adjacent backlight region adjacent to the backlight region corresponding to the second backlight brightness value; determining a backlight brightness difference value based on the third backlight brightness value and the second backlight brightness value; determining whether the backlight brightness difference value is greater than a preset backlight brightness threshold value; in a case where it is determined that the backlight brightness difference value is greater than the preset backlight brightness threshold value, querying a fourth backlight adjustment coefficient corresponding to the third backlight brightness value from a fourth backlight adjustment coefficient query table, wherein the fourth backlight adjustment coefficient query table stores a corresponding relationship between third backlight brightness values and backlight adjustment coefficients; determining a backlight dimming value based on the third backlight brightness value and the fourth backlight adjustment coefficient, so as to perform backlight dimming adjustment on the third backlight brightness value according to the backlight dimming value.
9. An apparatus for backlight adjustment, the apparatus comprising: the device comprises: a division module configured to divide a current image into a plurality of image regions when it is detected that the current image belongs to a low-brightness picture, wherein each of the image regions corresponds to a backlight region; a first determination module configured to determine image dark areas from the plurality of image regions, wherein each of the image dark areas is a low-brightness image region; an acquisition module configured to, for each of the image dark areas, acquire color values of pixel points in the image dark area; The second determining module is configured to determine a backlight adjustment type and a backlight adjustment coefficient of the image dark area based on color values of each of the pixel points in the image dark area, wherein the backlight adjustment type is a first backlight adjustment type requiring brightening backlight or a second backlight adjustment type requiring darkening backlight. The backlight adjustment module is configured to perform backlight adjustment on a backlight area corresponding to the image dark area according to the backlight adjustment type and the backlight adjustment coefficient. The second determining module is further configured to calculate color absolute difference values of any two adjacent pixel points based on the color values of each of the pixel points in the image dark area. It is determined whether each of the color absolute difference values is greater than a preset color difference threshold value. In a case where it is determined that at least one of the color absolute difference values is greater than the preset color difference threshold value, it is determined that the backlight adjustment type of the image dark area is the first backlight adjustment type, and a first backlight adjustment coefficient of the image dark area is determined based on at least one of the color absolute difference values greater than the preset color difference threshold value. In a case where it is determined that each of the color absolute difference values is less than or equal to the preset color difference threshold value, color absolute difference values of each of the pixel points are calculated based on the color values of each of the pixel points. It is determined whether each of the color absolute difference values of each of the pixel points is greater than a preset color difference threshold value. In a case where it is determined that at least one of the color absolute difference values of each of the pixel points is greater than the preset color difference threshold value, it is determined that the backlight adjustment type of the image dark area is the first backlight adjustment type, and a second backlight adjustment coefficient of the image dark area is determined based on at least one of the color absolute difference values greater than the preset color difference threshold value. In a case where it is determined that each of the color absolute difference values of each of the pixel points is less than or equal to the preset color difference threshold value, it is determined that the backlight adjustment type of the image dark area is the second backlight adjustment type, and a third backlight adjustment coefficient of the image dark area is determined based on the color values of each of the pixel points.
Citation Information
Patent Citations
Method for eliminating light leak of liquid crystal display
CN103021345A
Screen brightness adjusting method, device and terminal
CN105979400A