Backlight adjusting method and device
By dividing the image area and determining the dark area in the low-bright picture, and adjusting the backlight according to the pixel color value, the problem that the prior art cannot realize local backlight adjustment is solved, dynamic adjustment of contrast and retaining dark details is achieved, and user experience is improved.
Patent Information
- Application Number
- CN202411907946.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-12-20
AI Technical Summary
The prior art cannot realize local backlight adjustment in low-bright pictures, resulting in incompatibility of content in different scenes, resulting in discounts on viewer contrast and reducing user experience.
By detecting that the current image belongs to a low-bright picture, it is divided into multiple image areas, each image dark area is determined, and the backlight adjustment type and coefficient are determined based on the color values of pixel points in the image dark area, and the backlight brightness or dark adjustment is performed for the backlight area corresponding to the image dark area.
Local adjustments to the backlight are achieved, visual contrast is dynamically adjusted, and more dark details are retained, so that different scene contents in low-bright pictures can be compatible and improve user experience.
Smart Images

Figure CN119649766A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of display technology, and in particular to a backlight adjustment method and device. Background Art
[0002] Nowadays, in order to satisfy consumers' demand for a better viewing experience when watching TV, TV manufacturers have added local dimming (LD for short) to mid-to-high-end models.
[0003] The LD function means that the backlight of the display product is evenly divided into several areas, and the backlight of each area can be intelligently adjusted in real time according to the content of the picture, so as to achieve two purposes: energy saving and improvement of picture contrast. According to the product size and the hardware capabilities of the main chip, the number of current products ranges from dozens to tens of thousands of areas. Due to the differences in module design and liquid crystal light transmission performance, the halo phenomenon is inevitable regardless of the number of areas. Generally speaking, the more areas, the finer the light control and the smaller the halo. However, the number of areas depends on hardware performance, cost, and product positioning. Therefore, the halo phenomenon cannot be solved by unlimitedly increasing the number of backlight areas.
[0004] In the existing technology, special filter (spatial filter, SPF for short) technology can be used to reduce the halo phenomenon, but it is not compatible with various low-brightness pictures. For example, the darker the picture of the sky without details at night, the higher the contrast will be. SPF technology will be used to reduce the backlight of the entire picture to achieve this. However, when there is a tree full of details under the night light, in order to make the details appear, SPF technology will be used to increase the backlight of the entire picture. This method of adjusting the backlight using SPF technology cannot achieve local backlight adjustment, making different scene contents incompatible in low-brightness pictures, which can easily cause the viewer's contrast perception to be discounted, 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 of different scene contents in low-light images, which easily causes the viewer's contrast perception to be discounted, thereby reducing the user experience, an embodiment of the present invention provides a backlight adjustment method and device.
[0006] In a first aspect, an embodiment of the present invention provides a backlight adjustment method, the method comprising:
[0007] When detecting that the current image belongs to a low-light image, the current image is divided into a plurality of image regions; wherein each image region corresponds to a backlight region;
[0008] Determine each image dark area from a plurality of image areas; wherein each image dark area is an image area with low brightness;
[0009] For each dark area of the image, the following steps are performed: obtaining the color value of each pixel in the dark area of the image;
[0010] Determine the backlight adjustment type and the 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 a first backlight adjustment type that requires brightening the backlight or a second backlight adjustment type that requires dimming the backlight;
[0011] 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.
[0012] In a possible implementation, detecting that the current image belongs to a low-brightness image includes:
[0013] Get the grayscale value range of the current image;
[0014] Dividing the gray value range into a plurality of equally spaced gray value sub-ranges;
[0015] Count the number of pixels in each gray value sub-range;
[0016] Determining, from the plurality of gray value sub-ranges, a plurality of target gray value sub-ranges whose gray values do not exceed a preset gray threshold;
[0017] Determine a first total number of pixels based on the number of pixels corresponding to each target gray value sub-range;
[0018] Determine the second total number of pixels based on the number of pixels corresponding to each gray value sub-range and a preset number ratio;
[0019] determining whether the first pixel total amount is equal to or greater than the second pixel total amount;
[0020] When it is determined that the total amount of the first pixels is equal to or greater than the total amount of the second pixels, it is detected that the current image belongs to a low-brightness picture.
[0021] In a possible implementation, determining each image dark area from a plurality of image areas includes:
[0022] The following operations are performed for each image region: the grayscale value of each pixel in the image region is obtained;
[0023] Determine the regional grayscale mean based on the grayscale value of each pixel;
[0024] Determine whether the grayscale mean of the region is less than or equal to a preset grayscale threshold;
[0025] When the grayscale mean value of the determined area is less than or equal to the preset grayscale threshold, the image area is determined as a dark area of the image.
[0026] In a possible implementation, determining the backlight adjustment type and the 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 includes:
[0027] Calculate the absolute color difference between any two adjacent pixels based on the color value of each pixel in the dark area of the image;
[0028] Determine whether the absolute difference of each color is greater than a preset color difference threshold;
[0029] In the case where it is determined that at least one color absolute difference is greater than a preset color difference threshold, determining the backlight adjustment type of the dark area of the image to be a first backlight adjustment type, and determining a first backlight adjustment coefficient of the dark area of the image based on at least one color absolute difference greater than the preset color difference threshold;
[0030] When it is determined that the absolute color difference values of each color are 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] In the case where it is determined that the color absolute difference value of at least one pixel point is greater than a preset color difference value threshold, determining the backlight adjustment type of the dark area of the image to be a first backlight adjustment type, and determining a second backlight adjustment coefficient of the dark area of the image based on at least one color absolute difference value greater than the preset color difference value threshold;
[0033] When it is determined that the absolute color difference values of each pixel point are 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 a third backlight adjustment coefficient of the dark area of the image is determined based on the color value of each pixel point.
[0034] In a possible implementation, determining a backlight adjustment coefficient of a dark area of an image based on at least one color absolute difference greater than a preset color difference threshold includes:
[0035] Selecting the largest target color absolute difference from at least one color absolute difference greater than a preset color difference threshold;
[0036] Querying a backlight adjustment coefficient corresponding to the target color absolute difference from a first backlight adjustment coefficient query table; wherein the first backlight adjustment coefficient query table stores a correspondence between the color absolute difference 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 of the dark area of the image.
[0038] In a possible implementation, the color absolute difference value includes a red-green channel color absolute difference value, a red-blue channel color absolute difference value, and a blue-green channel color absolute difference value;
[0039] Determining whether the absolute color difference value of each pixel is greater than a preset color difference value threshold includes:
[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-green channel is greater than a preset blue-green difference threshold;
[0041] Determining a second backlight adjustment coefficient of a dark area of an image based on at least one color absolute difference value greater than a preset color difference value threshold comprises:
[0042] Selecting the maximum target color absolute difference value from at least one color absolute difference value greater than a preset color difference value threshold;
[0043] Querying a backlight adjustment coefficient corresponding to the target color absolute difference value from a second backlight adjustment coefficient query table; wherein the second backlight adjustment coefficient query table stores a correspondence between the color absolute difference value and the backlight adjustment coefficient;
[0044] The backlight adjustment coefficient corresponding to the target color absolute difference value is determined as the second backlight adjustment coefficient of the dark area of the image.
[0045] In one possible implementation, the color value includes a red color value, a green color value, and a blue color value;
[0046] Determining a third backlight adjustment coefficient of a dark area of an image based on the color value of each pixel point includes:
[0047] Determine whether the red color value, green color value and blue color value corresponding to each pixel point are all equal to a preset color threshold;
[0048] When it is determined that 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, determining the total color value based on the red color value, the green color value, and the blue color value;
[0049] Querying the backlight adjustment coefficient corresponding to the total color value from the third backlight adjustment coefficient query table; wherein the third backlight adjustment coefficient query table stores the corresponding relationship between the total color value and the backlight adjustment coefficient;
[0050] Determining a backlight adjustment coefficient corresponding to the total color value as a third backlight adjustment coefficient for a dark area of the image;
[0051] When it is determined that the red color value, the green color value, and the blue color value corresponding to at least one pixel point are not equal to the preset color threshold, the preset backlight adjustment coefficient is determined as the third backlight adjustment coefficient of the dark area of the image.
[0052] In a possible implementation, performing backlight adjustment on a backlight area corresponding to a dark area of an image according to a backlight adjustment type and a backlight adjustment coefficient includes:
[0053] Get 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, a backlight boost 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 as to perform backlight boost adjustment on the backlight brightness value according to the backlight boost value;
[0055] When the backlight adjustment type is the second backlight adjustment type, a backlight dimming value is determined 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.
[0056] In one possible implementation, the method further includes:
[0057] Obtaining a first backlight brightness value corresponding to each backlight area after backlight adjustment;
[0058] Determining whether each first backlight brightness value is equal to a preset backlight brightness threshold;
[0059] In the case where it is determined that at least one backlight brightness value among the backlight brightness values is equal to the preset backlight brightness threshold, each backlight brightness value among the at least one backlight brightness value equal to the preset backlight brightness threshold is used as a second backlight brightness value to perform the following operation:
[0060] Acquire a third backlight brightness value of an adjacent backlight area adjacent to the backlight area corresponding to the second backlight brightness value;
[0061] determining a backlight brightness difference value based on the third backlight brightness value and the second backlight brightness value;
[0062] Determine whether the backlight brightness difference is greater than a preset backlight brightness threshold;
[0063] When it is determined that the backlight brightness difference is greater than the preset backlight brightness threshold, 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 correspondence between the third backlight brightness value and the backlight adjustment coefficient;
[0064] A backlight dimming value is determined 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.
[0065] In a second aspect, an embodiment of the present invention provides a backlight adjustment device, the device comprising:
[0066] A division module, for dividing the current image into a plurality of image regions when detecting that the current image belongs to a low-light image; wherein each image region corresponds to a backlight region;
[0067] A first determination module is used to determine each dark image area from a plurality of image areas; wherein each dark image area is an image area with low brightness;
[0068] The acquisition module is used to execute, for each dark area of the image: acquiring the color value of each pixel in the dark area of the image;
[0069] A second determination module is used to determine the backlight adjustment type and the 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 a first backlight adjustment type that requires brightening the backlight or a second backlight adjustment type that requires dimming 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 the backlight adjustment coefficient.
[0071] In a third aspect, an embodiment of the present invention provides an electronic device, which includes: a processor and a memory, the processor is used to execute a backlight adjustment program stored in the memory to implement the above-mentioned backlight adjustment method.
[0072] In a fourth aspect, an embodiment of the present invention provides a storage medium, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the above-mentioned backlight adjustment method.
[0073] The method and device for backlight adjustment provided by the embodiments of the present invention include: when it is detected that the current image belongs to a low-brightness picture, dividing the current image into multiple image areas; wherein each image area corresponds to a backlight area; determining each image dark area from the multiple image areas; wherein each image dark area is an image area with low brightness; for each image dark area, executing: obtaining the color value of each pixel in the image dark area; determining the backlight adjustment type and backlight adjustment coefficient of the image dark area based on the color value of each pixel in the image dark area; wherein the backlight adjustment type is the first backlight adjustment type that needs to brighten the backlight or the second backlight adjustment type that needs to dim the backlight; and performing backlight adjustment on the backlight area corresponding to the image dark area according to the backlight adjustment type and the backlight adjustment coefficient. The above technical solution can dim or brighten the backlight area according to the backlight adjustment type of each dark area of the image in the low-brightness picture, thereby realizing local adjustment of the backlight to achieve dynamic adjustment of the visual contrast, retaining more dark details so that different scene contents in the low-brightness picture can be compatible. Compared with the existing SPF technology for adjusting the backlight, it can effectively alleviate the technical problem that the SPF technology cannot be used to achieve local backlight adjustment, resulting in incompatibility of different scene contents in the low-brightness picture, which easily causes the viewer to discount the contrast perception, thereby reducing the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] Figure 1 A flow chart of an embodiment of a backlight adjustment method provided by an embodiment of the present invention;
[0075] Figure 2 A flow chart of another backlight adjustment method provided by an embodiment of the present invention;
[0076] Figure 3 A flow chart of another backlight adjustment method provided by an embodiment of the present invention;
[0077] Figure 4 A flow chart of another backlight adjustment method provided by an embodiment of the present invention;
[0078] Figure 5 A flow chart of another backlight adjustment method provided by an embodiment of the present invention;
[0079] Figure 6 A flow chart of another backlight adjustment method provided by an embodiment of the present invention;
[0080] Figure 7 A block diagram of an embodiment of a backlight adjustment device provided by an embodiment of the present invention;
[0081] Figure 8 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0082] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0083] To facilitate understanding of the embodiments of the present invention, specific embodiments will be further explained below in conjunction with the accompanying drawings. The embodiments do not constitute a limitation on the embodiments of the present invention.
[0084] The embodiment of the present invention provides a backlight adjustment method, which is applicable to terminal devices with LD functions, such as monitors, televisions, integrated conference machines, etc., which are not limited here. Figure 1 , Figure 1 A flow chart of an embodiment of a backlight adjustment method provided in an embodiment of the present invention. Figure 1 The process shown may include the following steps:
[0085] Step 101, when it is detected that the current image belongs to a low-light picture, the current image is divided into a plurality of image areas; wherein each image area corresponds to a backlight area;
[0086] In this embodiment, in order to effectively solve the technical problem that the existing SPF technology cannot achieve local backlight adjustment in low-brightness images, making the contents of different scenes in low-brightness images incompatible, it is necessary to perform local adjustment of the backlight according to the backlight adjustment method proposed in this embodiment when it is detected that the current image belongs to a low-brightness image.
[0087] Specifically, when it is detected that the current image belongs to a low-brightness picture, the current image is divided into multiple image areas according to the number of partitions of the backlight area, so as to facilitate the subsequent local backlight adjustment. It can be understood that there is a one-to-one correspondence between the image area and the backlight area, and the number of image areas actually divided depends on the number of backlight areas. The number of image areas is not limited here.
[0088] Step 102, determining each image dark area from a plurality of image areas;
[0089] Among them, each image dark area is an image area with low brightness. In order to improve the visual contrast and retain more dark details so that different scene contents can be compatible in the low-brightness picture, it is necessary to determine each image dark area from multiple image areas, so as to perform subsequent dynamic backlight adjustment to brighten or dim the backlight area corresponding to each image dark area.
[0090] Step 103, for each dark area of the image, execute: obtaining the color value of each pixel in the dark area of the image;
[0091] The above color value is the color information of the pixel in the dark area of the image, and is a value represented by the values of the three color channels of red (R), green (G), and blue (B).
[0092] Step 104, determining the backlight adjustment type and backlight adjustment coefficient of the dark area of the image based on the color value of each pixel;
[0093] Among them, the backlight adjustment type is the first backlight adjustment type that requires brightening the backlight or the second backlight adjustment type that requires dimming the backlight; it can be understood that if the backlight adjustment type is the first backlight adjustment type, it indicates that there are details that need to be expressed in the dark area of the image, and therefore, the backlight area of the dark area 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 that need to be expressed in the dark area of the image, and therefore, the backlight area of the dark area of the image needs to be dimmed to reduce the halo phenomenon while enhancing the visual contrast of the dark area of the image to highlight the details.
[0094] The backlight adjustment coefficient is a quantitative indicator of the degree of adjustment of the backlight dimming or brightening. Through the backlight adjustment coefficient, the backlight area corresponding to the dark area of the image can be accurately adjusted to achieve the purpose of dynamically adjusting the backlight.
[0095] Step 105 , performing backlight adjustment on the backlight area corresponding to the dark area of the image according to the backlight adjustment type and the backlight adjustment coefficient.
[0096] From the above description, it can be seen that since the backlight adjustment types corresponding to the dark areas of each image are different, the backlight area corresponding to the dark area of each image is adjusted to be dimmed or brightened according to the backlight adjustment coefficient, so as to achieve the purpose of improving the visual contrast between the dark areas of each image, and realize local adjustment of the backlight to achieve dynamic adjustment of the visual contrast, retain more dark details so that different scene contents can be compatible in low-light images.
[0097] The backlight adjustment method provided by the embodiment of the present invention can dim or brighten the backlight area according to the backlight adjustment type of each dark area of the image in the low-brightness picture, thereby realizing local adjustment of the backlight to achieve dynamic adjustment of the visual contrast, retaining more dark details so that different scene contents in the low-brightness picture can be compatible. Compared with the existing SPF technology for adjusting the backlight, it can effectively alleviate the technical problem that the SPF technology cannot be used to realize local backlight adjustment, resulting in the incompatibility of different scene contents in the low-brightness picture, which easily causes the viewer's contrast perception to be discounted, thereby reducing the user's usage experience.
[0098] like Figure 2 As shown, as an optional implementation, as in the above method, step 101 of detecting that the current image belongs to a low-brightness picture includes the following steps:
[0099] Step 201, obtaining the gray value range of the current image;
[0100] In actual application, the grayscale value range of the current image is related to the color depth display technology. For example, if the color depth is 10-bit display technology, the grayscale value range of the current image is 0-1023. If the color depth is 8-bit display technology, the grayscale value range of the current image is 0-255. If the color depth is 6-bit display technology, the grayscale value range of the current image is 0-63. Since the current display technology with a color depth of 10 bits is the most widely used technology, the display technology with a color depth of 10 bits is taken as an example below, and the grayscale value range of the current image is 0-1023.
[0101] Step 202, dividing the gray value range into a plurality of equally spaced gray value sub-ranges;
[0102] In order to improve processing efficiency and accuracy, in this embodiment, the gray value range can be divided into a plurality of equally spaced gray value sub-ranges according to a preset number of divisions. For example, the preset number of divisions is 32, that is, the gray value range of 0-1023 is evenly divided into 32 gray value sub-ranges, that is, each gray value sub-range includes 32 gray levels, and the gray value sub-ranges after division are 0-31, 32-63 ... 992-1023. The number of gray value sub-ranges can be obtained by division according to actual needs and is not limited here.
[0103] Step 203, counting the number of pixels in each gray value sub-range;
[0104] Continuing with the previous example, the number of pixels whose grayscale values of each pixel in the current image fall within the above 32 grayscale value sub-ranges is counted.
[0105] Step 204, determining a plurality of target grayscale value subranges whose grayscale values do not exceed a preset grayscale threshold from the plurality of grayscale value subranges;
[0106] The preset grayscale threshold is a pre-set grayscale value that represents a low-brightness image. For example, if the preset grayscale threshold is 160, then the five grayscale value subranges of 0-31, 32-63, 64-95, 96-127, and 128-159 in the above 32 grayscale value subranges can be determined as target grayscale value subranges. Since the grayscale values in the grayscale value subranges of 160-191 to 992-1023 exceed the preset grayscale threshold, the grayscale value subrange of 160-191 to 992-1023 cannot be determined as the target grayscale value subrange. In actual applications, the preset grayscale threshold can be set according to actual needs and is not limited here.
[0107] Step 205, determining the first total pixel quantity based on the number of pixels corresponding to each target gray value sub-range;
[0108] The number of pixels corresponding to each of the above target gray value sub-ranges is added together to obtain a first total number of pixels.
[0109] Step 206, determining the second total number of pixels based on the number of pixels corresponding to each gray value sub-range and a preset number ratio;
[0110] The number of pixels corresponding to each grayscale value sub-range is added and multiplied by the preset number ratio to obtain the second total number of pixels, wherein the preset number ratio can be set to 80%, then the second total number of pixels is 80% of the total number of pixels in each grayscale value sub-range. The above preset number ratio can be set according to actual needs and is not limited here.
[0111] Step 207, determining whether the first pixel total amount is equal to or greater than the second pixel total amount;
[0112] Step 208: When it is determined that the total amount of the first pixels is equal to or greater than the total amount of the second pixels, it is detected that the current image belongs to a low-brightness picture.
[0113] When it is determined that the total amount of the first pixels is equal to or greater than the total amount of the second pixels, it indicates that the number of pixels corresponding to the grayscale values below the preset grayscale threshold accounts for a large proportion, and it can be determined that the current image belongs to a low-brightness picture. When it is determined that the total amount of the first pixels is less than the total amount of the second pixels, it is determined that the current image does not belong to a low-brightness picture, and there is no need to perform the backlight adjustment method provided in this embodiment.
[0114] Through the method in this embodiment, it is possible to detect whether the current image is a low-brightness image based on the number of pixels falling within each grayscale value sub-range, thereby improving the accuracy of image detection and laying the foundation for subsequent backlight adjustment.
[0115] like Figure 3As shown, as an optional implementation, as in the above method, step 102 of determining each dark area of the image from multiple image areas includes the following steps:
[0116] Step 301, performing the following operations for each image region: obtaining the gray value of each pixel in the image region;
[0117] Step 302, determining the regional grayscale mean based on the grayscale value of each pixel;
[0118] The grayscale value of each pixel in the image area is added and then the average is calculated to obtain the regional grayscale mean of the image area.
[0119] Step 303, determining whether the regional grayscale mean is less than or equal to a preset grayscale threshold;
[0120] The preset grayscale threshold is the same as the preset grayscale threshold in the above step 204 .
[0121] Step 304: When the grayscale mean value of the determined area is less than or equal to the preset grayscale threshold, the image area is determined as a dark area of the image.
[0122] When the grayscale mean of the judgment area is less than the preset grayscale threshold, it indicates that the image area is a dark area with low brightness. When the grayscale mean of the judgment area is greater than the preset grayscale threshold, it indicates that the image area is not a dark area with low brightness.
[0123] Through the method in this embodiment, it is possible to accurately determine whether the image area is a dark area by comparing the regional grayscale mean corresponding to the image area with the preset grayscale 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, as in the above method, step 104 determines 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, including the following steps:
[0125] Step 401, calculating the absolute color difference between any two adjacent pixels based on the color value of each pixel in the dark area of the image;
[0126] Since the color value of the pixel point includes a red color value, a green color value and a blue color value, in this embodiment, the red color value, the green color value and the blue color value corresponding to each pixel point in the dark area of the image are first added to obtain the total color value, and then the total color values corresponding to any two adjacent pixel points in the dark area of the image are subtracted and the absolute value is taken to obtain the absolute color difference value of any two adjacent pixel points.
[0127] Step 402, determining whether the absolute difference of each color is greater than a preset color difference threshold;
[0128] Among them, the preset color difference threshold is a preset critical value of the absolute color difference that characterizes the presence of detail in the dark area of the image, that is, if the absolute color difference is greater than the preset color difference threshold, it means that there is detail in the dark area of the image, otherwise, it means that there is no detail in the dark area of the image.
[0129] Step 403, when it is determined that at least one color absolute difference is greater than a preset color difference threshold, determining the backlight adjustment type of the dark area of the image as a first backlight adjustment type, and determining a first backlight adjustment coefficient of the dark area of the image based on at least one color absolute difference greater than the preset color difference threshold;
[0130] When it is determined that one or more absolute color differences are greater than a preset color difference threshold, it indicates that there are details in the dark area of the image. In order not to affect the display of the dark details, it is necessary to brighten the backlight area of the dark area of the image to enhance the visibility of the dark details. Therefore, the backlight adjustment type of the dark area of the image is determined to be the first backlight adjustment type that requires backlight brightening.
[0131] The backlight brightness of the dark area of the image can be appropriately increased by determining the first backlight adjustment coefficient. In this embodiment, the larger the absolute color difference is, the larger the first backlight adjustment coefficient is. Conversely, the smaller the absolute color difference is, the smaller the first backlight adjustment coefficient is. The specific process of determining the first backlight adjustment coefficient can be implemented through steps A1 to A3:
[0132] Step A1, selecting the largest target color absolute difference from at least one color absolute difference greater than a preset color difference threshold;
[0133] If there is only one color absolute difference greater than the preset color difference threshold, then the color absolute difference is used as the target color absolute difference; if there are multiple color absolute differences greater than the preset color difference threshold, and there are also multiple maximum color absolute differences, then the largest color absolute difference can be randomly selected from them as the target color absolute difference.
[0134] Step A2, querying a backlight adjustment coefficient corresponding to the absolute difference of the target color from a first backlight adjustment coefficient query table;
[0135] The first backlight adjustment coefficient query table stores the corresponding relationship between the color absolute difference and the backlight adjustment coefficient. For ease of understanding, the first backlight adjustment coefficient query table is shown in Table 1:
[0136] Table 1
[0137] Absolute Color Difference Backlight adjustment factor 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 the absolute color difference and the backlight adjustment coefficient. The specific correspondence between the absolute color difference and the 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 of the dark area of the image.
[0140] If the target color absolute difference is 8, it can be known from Table 1 that the first backlight adjustment coefficient corresponding to the dark area of the image is 0.1.
[0141] Step 404, when it is determined that the absolute color difference values of each pixel are 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;
[0142] When it is determined that the absolute color difference of each color is less than or equal to the preset color difference threshold, it means that the absolute color difference cannot directly reflect whether there are details in the dark area of the image, so it is necessary to further determine based on the absolute color difference value of each pixel.
[0143] Among them, the absolute color difference value includes the absolute color difference value of the red and green channels, the absolute color difference value of the red and blue channels, and the absolute color difference value of the blue and green channels. Therefore, the color value corresponding to each pixel point needs to obtain the absolute value after subtracting the red color value from the green color value, the absolute value after subtracting the red color value from the blue color value, and the absolute value after subtracting the blue color value from the green color value to obtain the above-mentioned absolute color difference value.
[0144] Step 405, determining whether the absolute color difference value of each pixel is greater than a preset color difference value threshold;
[0145] That is, it is determined whether the absolute color difference value of the red and green channels of each pixel point is greater than the preset red-green difference threshold, or whether the absolute color difference value of the red and blue channels is greater than the preset red-blue difference threshold, or whether the absolute color difference value of the blue-green channel is greater than the preset blue-green difference threshold.
[0146] Step 406, when it is determined that the color absolute difference value of at least one pixel point is greater than the preset color difference value threshold, determining the backlight adjustment type of the dark area of the image as the first backlight adjustment type, and determining a second backlight adjustment coefficient of the dark area of the image based on at least one color absolute difference value greater than the preset color difference value threshold;
[0147] When it is determined that the absolute color difference value of at least one pixel point is greater than the preset color difference value threshold, that is, there are one or more pixels whose corresponding red and green channel absolute color difference values are greater than the preset red-green difference threshold, or, the red and blue channel absolute color difference value is greater than the preset red-blue difference threshold, or, the blue-green channel absolute color difference value is greater than the preset blue-green difference threshold, 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 the dark area. Therefore, the backlight adjustment type of the dark area of the image is determined to be the first backlight adjustment type that requires backlight brightening.
[0148] The backlight brightness of the dark area of the image can be appropriately increased by the determined second backlight adjustment coefficient. In this embodiment, the larger the absolute color difference value is, the larger the second backlight adjustment coefficient is. Conversely, the smaller the absolute color difference value is, the smaller the second backlight adjustment coefficient is. The specific process of determining the second backlight adjustment coefficient can be implemented through steps B1 to B3:
[0149] Step B1, selecting the maximum target color absolute difference value from at least one color absolute difference value greater than a preset color difference value threshold;
[0150] It can be understood that the maximum absolute color difference value is selected as the target color absolute difference value from at least one red-green channel color absolute difference value, and / or a red-blue channel color absolute difference value, and / or a blue-green channel color absolute difference value that is greater than a preset color difference value threshold.
[0151] Step B2, querying a backlight adjustment coefficient corresponding to the target color absolute difference value from a second backlight adjustment coefficient query table;
[0152] The second backlight adjustment coefficient query table stores the correspondence between the color absolute difference value and the backlight adjustment coefficient. The second backlight adjustment coefficient query table is similar to the first backlight adjustment coefficient query table and will not be described in detail here. If necessary, the range of the backlight adjustment coefficient in the second backlight adjustment coefficient query table is also [0-1].
[0153] Step B3: determining the backlight adjustment coefficient corresponding to the target color absolute difference value as the second backlight adjustment coefficient of the dark area of the image.
[0154] After the target color absolute difference value is determined, the second backlight adjustment coefficient of the dark area of the image can be determined by querying the second backlight adjustment coefficient query table, so as to brighten the backlight of the dark area of the image based on the second backlight adjustment coefficient.
[0155] Step 407, when it is determined that the absolute color difference value of each pixel point 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 point.
[0156] When it is determined that the absolute color difference values of each pixel point are less than or equal to the preset color difference value threshold, it means that there is no detail performance in the dark area of the image directly reflected by the absolute color difference value. Therefore, the backlight adjustment type of the dark area of the image is determined to be the second backlight adjustment type that requires backlight dimming, so as to dim the backlight area corresponding to the dark area of the image, so as to enhance the visual contrast of the dark area of the image with the details highlighted while reducing the halo phenomenon.
[0157] The backlight dimming of the dark area of the image can be appropriately reduced by using the determined third backlight adjustment coefficient to reduce the backlight brightness corresponding to the dark area of the image. The specific process of determining the third backlight adjustment coefficient can be implemented through steps C1 to C5:
[0158] Step C1, determining whether the red color value, green color value and blue color value corresponding to each pixel point are all equal to a preset color threshold;
[0159] That is, it is determined that the red color value of each pixel = the green color value = the blue color value = the preset color threshold.
[0160] Step C2, when it is determined that 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, determining the total color value based on the red color value, the green color value and the blue color value;
[0161] When it is determined that the red color value, green color value and blue color value corresponding to each pixel point are equal to the preset color threshold, that is, the red color value = green color value = blue color value = preset color threshold, it means that the dark area of the image is a grayscale field. In order to improve the visual contrast, the third backlight adjustment coefficient can be set to appropriately dim the backlight brightness corresponding to the dark area of the image, wherein the larger the red color value, the green color value and the blue color value, the larger the third backlight adjustment coefficient and the lower the degree of dimming; conversely, the smaller the third backlight adjustment coefficient, the stronger the degree of dimming; therefore, when it is determined that the red color value, the green color value and the blue color value corresponding to each pixel point are equal to the preset color threshold, it is necessary to determine the total color value based on the red color value, the green color value and the blue color value, so as to determine the third backlight adjustment coefficient using the total color value.
[0162] Step C3, querying a backlight adjustment coefficient corresponding to the total color value from a third backlight adjustment coefficient query table;
[0163] Among them, the third backlight adjustment coefficient query table stores the correspondence between the total color value and the backlight adjustment coefficient; the third backlight adjustment coefficient query table is similar to the first backlight adjustment coefficient query table and will not be described in detail here. If necessary, the range of the backlight adjustment coefficient in the third backlight adjustment coefficient query table is also [0-1].
[0164] Step C4, determining the backlight adjustment coefficient corresponding to the total color value as the third backlight adjustment coefficient of the dark area of the image;
[0165] After the total color value is determined, the third backlight adjustment coefficient of the dark area of the image can be determined by querying the third backlight adjustment coefficient query table, so as to dim the backlight of the dark area of the image based on the third backlight adjustment coefficient.
[0166] Step C5, when it is determined that the red color value, the green color value and the blue color value corresponding to at least one pixel point are not equal to the preset color threshold, the preset backlight adjustment coefficient is determined as the third backlight adjustment coefficient of the dark area of the image.
[0167] When it is determined that the red color value, green color value and blue color value corresponding to at least one pixel point are not equal to the preset color threshold, it means that the dark area of the image is not a pure grayscale field. Then, 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 perform backlight dimming, wherein 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, as in the above method, step 105 of performing backlight adjustment on 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, obtaining 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 a backlight boost 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 perform backlight boost adjustment on the backlight brightness value according to the backlight boost value;
[0171] Among them, the calculation formula of the backlight brightening value is: backlight brightness value * first backlight adjustment coefficient or backlight brightness value * second backlight adjustment coefficient. Therefore, when it is necessary to brighten the backlight of the backlight area corresponding to the dark area of the image, it is necessary to adjust the backlight brightness value upward on the basis of the backlight brightness value, that is, the backlight brightness value after the backlight brightening value is increased is: backlight brightness value + backlight brightening value.
[0172] Step 503 : when the backlight adjustment type is the second backlight adjustment type, determine 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.
[0173] Among them, the calculation formula of the backlight dimming value is: backlight dimming value * the 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, it is necessary to adjust the backlight brightness value downward based on the backlight brightness value, that is, the backlight brightness value after the backlight dimming value is reduced is: backlight brightness value - backlight dimming value.
[0174] Through the method provided in this embodiment, the backlight area corresponding to the dark area of the image can be accurately brightened or dimmed through the backlight adjustment coefficient, so as to achieve the purpose of dynamically adjusting the backlight, improve the visual contrast between the dark areas of each image, realize local adjustment of the backlight, retain more dark details so that different scene contents can be compatible in low-brightness images.
[0175] exist Figure 1 Based on Figure 6 , Figure 6 A flow chart of another backlight adjustment method provided in an embodiment of the present invention. Figure 6 The process shown may include the following steps:
[0176] Step 601, when it is detected that the current image belongs to a low-light picture, the current image is divided into a plurality of image regions; wherein each image region corresponds to a backlight region;
[0177] Step 602, determining each image dark area from a plurality of image areas; wherein each image dark area is an image area with low brightness;
[0178] Step 603, for each dark area of the image, the following steps are performed: obtaining the color value of each pixel in the dark area of the image;
[0179] Step 604, determining the backlight adjustment type and the 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 a first backlight adjustment type that requires brightening the backlight or a second backlight adjustment type that requires dimming the backlight;
[0180] Step 605, performing backlight adjustment on the backlight area corresponding to the dark area of the image according to the backlight adjustment type and the backlight adjustment coefficient;
[0181] The process of the above steps 601 to 605 is the same as the process of steps 101 to 105, and will not be described in detail here.
[0182] Step 606, obtaining the first backlight brightness value corresponding to each backlight area after backlight adjustment;
[0183] Step 607, determining whether each first backlight brightness value is equal to a preset backlight brightness threshold;
[0184] Among them, the preset backlight brightness threshold can be set to 0, 1 or 2, etc., which is used to represent a value of low backlight brightness. The preset backlight brightness threshold can be set according to actual needs and is not limited here.
[0185] Step 608: When it is determined that at least one backlight brightness value among the backlight brightness values is equal to the preset backlight brightness threshold, each backlight brightness value among the at least one backlight brightness value equal to the preset backlight brightness threshold is used as a second backlight brightness value to perform the following operation:
[0186] Step 609, obtaining a third backlight brightness value of an adjacent backlight area adjacent to the backlight area corresponding to the second backlight brightness value;
[0187] That is, the third backlight brightness values of each adjacent backlight area adjacent to the backlight area corresponding to the second backlight brightness value are obtained.
[0188] Step 610, determining a backlight brightness difference based on the third backlight brightness value and the second backlight brightness value;
[0189] The backlight brightness difference is obtained by performing a difference calculation between the third backlight brightness value and the second backlight brightness value.
[0190] Step 611, determining whether the backlight brightness difference is greater than a preset backlight brightness threshold;
[0191] The preset backlight brightness threshold is a pre-set critical value representing a highlight area. The preset backlight brightness threshold can be set according to actual needs and is not limited here.
[0192] Step 612, when it is determined that the backlight brightness difference is greater than the preset backlight brightness threshold, querying a fourth backlight adjustment coefficient corresponding to the third backlight brightness value from a fourth backlight adjustment coefficient query table;
[0193] When it is determined that the backlight brightness difference is greater than the preset backlight brightness threshold, it means that the adjacent backlight area adjacent to the backlight area corresponding to the second backlight brightness value is a highlight area, which will make the halo more obvious and is not conducive to visual contrast. Therefore, the fourth backlight adjustment coefficient is used to dim the backlight of the adjacent backlight area to achieve a better visual experience.
[0194] Among them, the fourth backlight adjustment coefficient query table stores the correspondence between the third backlight brightness value and the backlight adjustment coefficient; the fourth backlight adjustment coefficient query table is similar to the first backlight adjustment coefficient query table and is not described in detail here. If it needs to be explained, the range of the backlight adjustment coefficient in the fourth backlight adjustment coefficient query table is [0-255], and the default setting is 255. The larger the third backlight brightness value, the smaller the fourth backlight adjustment coefficient, and the higher the degree of reduction in the backlight brightness of the adjacent backlight area. Conversely, the larger the fourth backlight adjustment coefficient, the smaller the backlight adjustment range.
[0195] Step 613: determine 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.
[0196] Among them, the calculation formula of the backlight dimming value is: the third backlight brightness value * the fourth backlight adjustment coefficient. Therefore, when it is necessary to dim the backlight of the adjacent backlight area, it is necessary to adjust the backlight brightness value downward based on the third backlight brightness value, that is, the third backlight brightness value after the backlight dimming value is adjusted downward is: the third backlight brightness value - the backlight dimming value.
[0197] By using the method provided in this embodiment, when determining the adjacent backlight area of highlight, the adjacent backlight area can be further backlit to effectively reduce the halo phenomenon and achieve a better visual experience.
[0198] See also Figure 7 , is a block diagram of an embodiment of a backlight adjustment device provided by an embodiment of the present invention. Figure 7 As shown, the device comprises:
[0199] The division module 701 is used to divide the current image into a plurality of image regions when it is detected that the current image belongs to a low-light image; wherein each image region corresponds to a backlight region;
[0200] A first determining module 702 is used to determine each dark image area from a plurality of image areas; wherein each dark image area is an image area with low brightness;
[0201] The acquisition module 703 is used to execute, for each dark area of the image: acquiring the color value of each pixel in the dark area of the image;
[0202] A second determination module 704 is used to determine the backlight adjustment type and the 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 a first backlight adjustment type that requires brightening the backlight or a second backlight adjustment type that requires dimming 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 by the embodiment of the present invention can dim or brighten the backlight area according to the backlight adjustment type of each dark area of the image in the low-brightness picture, thereby realizing local adjustment of the backlight to achieve dynamic adjustment of the visual contrast, retaining more dark details so that different scene contents in the low-brightness picture can be compatible. Compared with the existing SPF technology for adjusting the backlight, it can effectively alleviate the technical problem that the SPF technology cannot be used to realize local backlight adjustment, resulting in the incompatibility of different scene contents in the low-brightness picture, which easily causes the viewer's contrast perception to be discounted, thereby reducing the user's usage experience.
[0205] Figure 8 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention, Figure 8 The electronic device 1200 shown 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 achieve connection and communication between these components. In addition to the data bus, the bus system 1205 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 1205 is not described in detail. Figure 8 Various buses are labeled as bus system 1205.
[0206] The user interface 1203 may include a display, a keyboard, or a pointing device (eg, a mouse, a trackball, a touch pad, or a touch screen).
[0207] It can be understood that the memory 1202 in the embodiment of the present invention can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus random access memory (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 embodiments, the memory 1202 stores the following elements, executable units or data structures, or a subset thereof, or an extended set thereof: an operating system 12021 and an application program 12022 .
[0209] The operating system 12021 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application 12022 includes various application programs, such as a media player (Media Player), a browser (Browser), etc., which are used to implement various application services. The program for implementing the method of the embodiment of the present invention can be included in the application 12022.
[0210] In the embodiment of the present invention, by calling the program or instruction stored in the memory 1202, specifically, the program or instruction stored in the application 12022, the processor 1201 is used to execute the method steps provided by each method embodiment.
[0211] The method disclosed in the above embodiment of the present invention can be applied to the processor 1201, or implemented by the processor 1201. The 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 hardware integrated logic circuit or software instructions in the processor 1201. The above processor 1201 can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiment of the present invention can be directly embodied as a hardware decoding processor to execute, or the hardware and software units in the decoding processor can be executed. The software unit can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 1202, and the processor 1201 reads the information in the memory 1202 and completes the steps of the above method in combination with its hardware.
[0212] It is understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPDevice, DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in the present application, or a combination thereof.
[0213] For software implementation, the technology described herein can be implemented by a unit that performs the functions described herein. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.
[0214] The electronic device provided in this embodiment may be Figure 8 The electronic device shown in FIG. 1 may perform the following steps: Figure 1-6 All steps of the backlight adjustment method are implemented Figure 1-6 For details, please refer to the technical effect of the backlight adjustment method shown in Figure 1-6 For the sake of brevity, the relevant description is not repeated here.
[0215] The embodiment of the present invention also provides a storage medium (computer-readable storage medium). The storage medium here stores one or more programs. The storage medium may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a read-only memory, a flash memory, a hard disk or a solid-state drive; the memory may also include a combination of the above-mentioned types of memory.
[0216] When one or more programs in the storage medium can be executed by one or more processors, the above-mentioned backlight adjustment method is implemented.
[0217] The processor is used to execute the backlight adjustment program stored in the memory to implement the steps of the backlight adjustment method.
[0218] The professionals should further realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0219] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0220] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method 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 in the scope of protection of the present invention.
Claims
1. A backlight adjustment method, characterized in that: The method comprises: When detecting that the current image belongs to a low-light picture, dividing the current image into a plurality of image areas; wherein each of the image areas corresponds to a backlight area; Determine each dark image area from the plurality of image areas; wherein each dark image area is an image area with low brightness; For each dark area of the image, the following steps are performed: obtaining a color value of each pixel in the dark area of the image; Determine the backlight adjustment type and the 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 a first backlight adjustment type that requires brightening the backlight or a second backlight adjustment type that requires dimming the backlight; 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.
2. The method according to claim 1, characterized in that The detecting that the current image belongs to a low-brightness image includes: Obtaining the grayscale value range of the current image; Dividing the grayscale value range into a plurality of equally spaced grayscale value sub-ranges; Counting the number of pixels within each gray value sub-range; Determining, from the plurality of gray value sub-ranges, a plurality of target gray value sub-ranges whose gray values do not exceed a preset gray threshold; Determine a first total number of pixels based on the number of pixels corresponding to each of the target gray value sub-ranges; Determine the second total number of pixels based on the number of pixels corresponding to each of the gray value sub-ranges and a preset number ratio; determining whether the first total pixel amount is equal to or greater than the second total pixel amount; When it is determined that the total amount of the first pixels is equal to or greater than the total amount of the second pixels, it is detected that the current image belongs to a low-brightness picture.
3. The method according to claim 1, characterized in that The step of determining each dark area of the image from the plurality of image areas comprises: The following operations are performed for each of the image regions: obtaining the grayscale value of each pixel in the image region; Determine the regional grayscale mean based on the grayscale value of each pixel point; Determine whether the grayscale mean of the region is less than or equal to a preset grayscale threshold; When it is determined that the grayscale mean value of the region is less than or equal to the preset grayscale threshold, the image region is determined as an image dark region.
4. The method according to claim 1, characterized in that The determining the backlight adjustment type and the 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 includes: Calculating the absolute color difference between any two adjacent pixels based on the color value of each pixel in the dark area of the image; Determine whether the absolute difference of each color is greater than a preset color difference threshold; In the case where it is determined that at least one of the color absolute difference values is greater than the preset color difference threshold, determining the backlight adjustment type of the dark area of the image to be the first backlight adjustment type, and determining a first backlight adjustment coefficient of the dark area of the image based on at least one of the color absolute difference values greater than the preset color difference threshold; When it is determined that each of the color absolute difference values is less than or equal to the preset color difference threshold, calculating the color absolute difference value of each of the pixel points based on the color value of each of the pixel points; Determine whether the absolute color difference value of each of the pixel points is greater than a preset color difference value threshold; In the case where it is determined that the color absolute difference value of at least one of the pixels is greater than the preset color difference value threshold, determining the backlight adjustment type of the dark area of the image to be the first backlight adjustment type, and determining a second backlight adjustment coefficient of the dark area of the image based on at least one of the color absolute difference values greater than the preset color difference value threshold; When it is determined that the absolute color difference value of each of the pixel points 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 a third backlight adjustment coefficient of the dark area of the image is determined based on the color value of each of the pixel points.
5. The method according to claim 4, characterized in that The determining the backlight adjustment coefficient of the dark area of the image based on at least one of the color absolute difference values greater than the preset color difference threshold value comprises: Selecting the largest target color absolute difference from at least one of the color absolute differences that is greater than the preset color difference threshold; Querying a backlight adjustment coefficient corresponding to the target color absolute difference from a first backlight adjustment coefficient query table; wherein the first backlight adjustment coefficient query table stores a correspondence between the color absolute difference and the backlight adjustment coefficient; A backlight adjustment coefficient corresponding to the target color absolute difference is determined as a first backlight adjustment coefficient for the dark area of the image.
6. The method according to claim 4, characterized in that The color absolute difference values include the red-green color channel absolute difference value, the red-blue color channel absolute difference value and the blue-green color channel absolute difference value; The determining whether the absolute color difference value of each pixel point is greater than a preset color difference value threshold comprises: Determine whether the absolute color difference value of the red and green channels of each pixel point 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-green channel is greater than a preset blue-green difference threshold; The determining the second backlight adjustment coefficient of the dark area of the image based on at least one of the color absolute difference values greater than the preset color difference value threshold comprises: Selecting the maximum target color absolute difference value from at least one of the color absolute difference values that is greater than the preset color difference value threshold; Querying a backlight adjustment coefficient corresponding to the target color absolute difference value from a second backlight adjustment coefficient query table; wherein the second backlight adjustment coefficient query table stores a correspondence between the color absolute difference value and the backlight adjustment coefficient; A backlight adjustment coefficient corresponding to the target color absolute difference value is determined as a second backlight adjustment coefficient for the dark area of the image.
7. The method according to claim 4, characterized in that The color values include red color value, green color value and blue color value; The determining the third backlight adjustment coefficient of the dark area of the image based on the color value of each of the pixel points includes: Determine whether the red color value, the green color value, and the blue color value corresponding to each of the pixel points are all equal to a preset color threshold; When it is determined that the red color value, the green color value, and the blue color value corresponding to each of the pixel points are all equal to a preset color threshold, determining a total color value based on the red color value, the green color value, and the blue color value; Querying 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 the color total value and the backlight adjustment coefficient; Determining a backlight adjustment coefficient corresponding to the total color value as a third backlight adjustment coefficient for the dark area of the image; When 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, the preset backlight adjustment coefficient is determined as the third backlight adjustment coefficient of the dark area of the image.
8. The method according to claim 4, characterized in that The performing backlight adjustment on the backlight area corresponding to the dark area of the image according to the backlight adjustment type and the backlight adjustment coefficient includes: Obtaining a backlight brightness value of a backlight area corresponding to a dark area of the image; When the backlight adjustment type is the first backlight adjustment type, a backlight boost 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 as to perform backlight boost adjustment on the backlight brightness value according to the backlight boost value; When the backlight adjustment type is the second backlight adjustment type, a backlight dimming value is determined 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.
9. The method according to claim 1, characterized in that: The method further comprises: Acquire a first backlight brightness value corresponding to each of the backlight areas after backlight adjustment; Determining whether each of the first backlight brightness values is equal to a preset backlight brightness threshold; In the case where it is determined that at least one of the backlight brightness values is equal to the preset backlight brightness threshold, each of the at least one backlight brightness value equal to the preset backlight brightness threshold is used as a second backlight brightness value to perform the following operation: Acquire a third backlight brightness value of an adjacent backlight area adjacent to the backlight area corresponding to the second backlight brightness value; Determine a backlight brightness difference value based on the third backlight brightness value and the second backlight brightness value; Determining whether the backlight brightness difference is greater than a preset backlight brightness threshold; In the case where it is determined that the backlight brightness difference is greater than the preset backlight brightness threshold, 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 correspondence between the third backlight brightness value and the backlight adjustment coefficient; A backlight dimming value is determined 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.
10. A backlight adjustment device, characterized in that: The device comprises: A division module, for dividing the current image into a plurality of image regions when detecting that the current image belongs to a low-light image; wherein each of the image regions corresponds to a backlight region; A first determining module is used to determine each image dark area from the plurality of image areas; wherein each image dark area is an image area with low brightness; An acquisition module is used to execute, for each dark area of the image: acquiring a color value of each pixel in the dark area of the image; A second determination module is used to determine the backlight adjustment type and the 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 a first backlight adjustment type that requires brightening the backlight or a second backlight adjustment type that requires dimming the backlight; A backlight adjustment module is used to perform backlight adjustment on a backlight area corresponding to the dark area of the image according to the backlight adjustment type and the backlight adjustment coefficient.
Citation Information
Patent Citations
Method for eliminating light leak of liquid crystal display
CN103021345A
Screen brightness adjusting method, device and terminal
CN105979400A
Regional backlight adjusting method for display equipment
CN115657368A
Backlight control device, method and equipment
CN116543709A
Backlight brightness automatic adjusting method and device based on monochromatic and color images
CN117475939A