An image saturation adjustment method and device, electronic equipment and storage medium

CN117132475BActive Publication Date: 2026-08-21SHENZHEN TCL NEW-TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211394409.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-08
Publication Date
2026-08-21
Estimated Expiration
2042-11-08

AI Technical Summary

Technical Problem

但是采用这种方案,由于饱和度曲线的调整参数是一定的,可能会产生色偏等异常的显示现象,影响图像的显示效果

Benefits of technology

[0039] The scheme of this invention can obtain the hue histogram of the image to be displayed, determine a set of hue processing weights corresponding to several preset hue intervals based on the hue histogram, obtain the luminance histogram of the image to be displayed, determine a set of luminance processing weights corresponding to several luminance intervals based on the luminance histogram, obtain the saturation histogram of the image to be displayed, determine an initial saturation weight set of the image to be displayed based on the hue histogram, the luminance histogram, and the saturation histogram, perform a fusion calculation on the initial saturation weight set based on the hue processing weight set and the luminance processing weight set to obtain a target saturation weight set, and adjust the saturation of the image to be displayed using the target saturation weight set. Since the target saturation weight set corresponding to the image to be displayed is dynamically determined based on the hue, luminance, and saturation of the image in this embodiment, the saturation of the image can be dynamically adjusted, improving the saturation adjustment effect and enhancing the user's visual experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117132475B_ABST
    Figure CN117132475B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose an image saturation adjustment method and device, electronic equipment and storage medium; embodiments of the present application can obtain the hue histogram of the image to be displayed, determine the preset hue processing weight set corresponding to a plurality of hue intervals based on the hue histogram, obtain the brightness histogram of the image to be displayed, determine the brightness processing weight set corresponding to a plurality of brightness intervals based on the brightness histogram, obtain the saturation histogram of the image to be displayed, determine the initial saturation weight set of the image to be displayed according to the hue histogram, the brightness histogram and the saturation histogram, perform fusion calculation on the initial saturation weight set based on the hue processing weight set and the brightness processing weight set, obtain the target saturation weight set, and adjust the saturation of the image to be displayed through the target saturation weight set; the saturation of the image can be dynamically adjusted, the saturation adjustment effect of the image is improved, and the visual experience of the user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of display technology, and more specifically to an image saturation adjustment method, apparatus, electronic device, and storage medium. Background Technology

[0002] With the rapid development of the economy and technology, people have increasingly higher requirements for the display effects of various display devices. Saturation is one of the constituent elements of image color. Because the human eye perceives color images much more richly than grayscale images, differences in the saturation of an image can have a significant impact on its display effect. Therefore, saturation adjustment is one of the most important parts of image processing.

[0003] Adjusting the saturation of images on a display device can improve its display quality. Currently, the main method for adjusting image saturation is to design a saturation curve to adjust the image's saturation. However, this approach, because the adjustment parameters of the saturation curve are fixed, may produce abnormal display phenomena such as color casts, affecting the image's display effect. Summary of the Invention

[0004] This invention provides an image saturation adjustment method, apparatus, electronic device, and storage medium, which can dynamically adjust the saturation of an image, improve the saturation adjustment effect, and enhance the user's visual experience.

[0005] This invention provides an image saturation adjustment method, comprising:

[0006] Obtain the hue histogram of the image to be displayed, and determine a set of hue processing weights corresponding to several preset hue intervals based on the hue histogram;

[0007] Obtain the brightness histogram of the image to be displayed, and determine a set of brightness processing weights corresponding to several brightness intervals based on the brightness histogram;

[0008] Obtain the saturation histogram of the image to be displayed, and determine the initial saturation weight set of the image to be displayed based on the hue histogram, the brightness histogram, and the saturation histogram;

[0009] Based on the hue processing weight set and the brightness processing weight set, the initial saturation weight set is fused and calculated to obtain the target saturation weight set;

[0010] The saturation of the image to be displayed is adjusted using the target saturation weight set.

[0011] Accordingly, embodiments of the present invention provide an image saturation adjustment device, comprising:

[0012] The tone weight determination unit is used to obtain the tone histogram of the image to be displayed, and determine a set of tone processing weights corresponding to a preset number of tone intervals based on the tone histogram.

[0013] A brightness weight determination unit is used to obtain the brightness histogram of the image to be displayed and determine a set of brightness processing weights corresponding to several brightness intervals based on the brightness histogram.

[0014] An initial saturation weight determination unit is used to obtain the saturation histogram of the image to be displayed, and determine the initial saturation weight set of the image to be displayed based on the hue histogram, the brightness histogram and the saturation histogram.

[0015] The target saturation weight determination unit is used to perform a fusion calculation on the initial saturation weight set based on the hue processing weight set and the brightness processing weight set to obtain the target saturation weight set.

[0016] The saturation adjustment unit is used to adjust the saturation of the image to be displayed using the target saturation weight set.

[0017] Optionally, the brightness weight determination unit is used to acquire the image to be displayed, perform hue feature statistics on the image to be displayed, and determine the hue histogram of the image to be displayed in a preset number of hue intervals.

[0018] Based on the hue statistics values ​​corresponding to each hue interval in the hue histogram, a target hue interval that meets the preset hue processing conditions and a target primary color interval corresponding to the target hue interval are determined.

[0019] Determine the primary color processing weights corresponding to the target primary color intervals, and calculate the set of hue processing weights corresponding to each hue interval based on the primary color processing weights and the hue statistics corresponding to each hue interval.

[0020] Optionally, the brightness weight determination unit is used to perform brightness feature statistics on the image to be displayed and determine the brightness histogram of the image to be displayed;

[0021] Calculate the first brightness statistical value corresponding to the first brightness interval of the preset first number based on the brightness histogram;

[0022] Based on the first brightness statistics, determine the brightness processing weight corresponding to each of the first brightness intervals;

[0023] Based on the brightness processing weights and the brightness statistics corresponding to each of the first brightness intervals, calculate the set of brightness processing weights corresponding to each of the first brightness intervals.

[0024] Optionally, the initial saturation weight determination unit is used to obtain the saturation histogram of the image to be displayed, perform feature calculation on the saturation histogram, and determine the target saturation feature corresponding to the saturation histogram;

[0025] Based on the hue statistics corresponding to each hue interval of the hue histogram, at least one target primary color interval corresponding to the hue histogram is determined;

[0026] Based on the target primary color range, the target hue feature corresponding to the hue histogram is obtained from the correspondence between the preset primary color range and the hue feature;

[0027] Calculate the second brightness statistical value corresponding to the second brightness interval under the preset second number of the brightness histogram, where the second number is the same as the number of the target primary color interval;

[0028] Based on the second brightness statistics, the target brightness feature corresponding to the brightness histogram is obtained from the preset correspondence between brightness statistics and brightness features;

[0029] Based on the target saturation features, target hue features, and target brightness features, the initial saturation weight set of the image to be displayed is obtained from the preset target mapping relationship.

[0030] Optionally, the target saturation weight determination unit is used to perform a fusion calculation on the hue processing weight set and the initial saturation weight set to obtain a two-dimensional candidate saturation weight set;

[0031] The brightness processing weight set and the candidate saturation weight set are fused together to obtain a three-dimensional target saturation weight set.

[0032] Optionally, the target saturation weight determination unit is used to adjust the one-dimensional initial saturation weight set into a two-dimensional first saturation weight set according to the number of hue processing weights in the hue processing weight set.

[0033] The saturation weights in the first saturation weight set and the hue processing weights in the hue processing weight set are weighted and calculated to obtain a two-dimensional candidate saturation weight set.

[0034] Optionally, the target saturation weight determination unit is used to adjust the two-dimensional candidate saturation weight set into a three-dimensional second saturation weight set according to the number of saturation processing weights in the saturation processing weight set.

[0035] The saturation weights in the second saturation weight set and the luminance processing weights in the luminance processing weight set are weighted and calculated to obtain a three-dimensional target saturation weight set.

[0036] Accordingly, embodiments of the present invention also provide an electronic device, including a memory and a processor; the memory stores an application program, and the processor is used to run the application program in the memory to perform the steps in any of the image saturation adjustment methods provided in the embodiments of the present invention.

[0037] Accordingly, embodiments of the present invention also provide a computer-readable storage medium storing a plurality of instructions adapted for loading by a processor to execute steps in any of the image saturation adjustment methods provided in the embodiments of the present invention.

[0038] Furthermore, embodiments of the present invention also provide a computer program product, including a computer program or instructions, which, when executed by a processor, implement the steps in any of the image saturation adjustment methods provided in the embodiments of the present invention.

[0039] The scheme of this invention can obtain the hue histogram of the image to be displayed, determine a set of hue processing weights corresponding to several preset hue intervals based on the hue histogram, obtain the luminance histogram of the image to be displayed, determine a set of luminance processing weights corresponding to several luminance intervals based on the luminance histogram, obtain the saturation histogram of the image to be displayed, determine an initial saturation weight set of the image to be displayed based on the hue histogram, the luminance histogram, and the saturation histogram, perform a fusion calculation on the initial saturation weight set based on the hue processing weight set and the luminance processing weight set to obtain a target saturation weight set, and adjust the saturation of the image to be displayed using the target saturation weight set. Since the target saturation weight set corresponding to the image to be displayed is dynamically determined based on the hue, luminance, and saturation of the image in this embodiment, the saturation of the image can be dynamically adjusted, improving the saturation adjustment effect and enhancing the user's visual experience. Attached Figure Description

[0040] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0041] Figure 1 This is a schematic diagram of a scenario for the image saturation adjustment method provided in an embodiment of the present invention;

[0042] Figure 2 This is a flowchart of the image saturation adjustment method provided in the embodiments of the present invention;

[0043] Figure 3 This is a schematic diagram of the statistical values ​​of the primary color range provided in the embodiments of the present invention;

[0044] Figure 4 This is a schematic diagram of the six primary colors provided in an embodiment of the present invention;

[0045] Figure 5 This is a schematic diagram of the statistical values ​​of the brightness range provided in the embodiments of the present invention;

[0046] Figure 6 This is a schematic diagram illustrating the technical implementation of the image saturation adjustment method provided in this embodiment of the invention;

[0047] Figure 7 This is a schematic diagram of the image saturation adjustment device provided in an embodiment of the present invention;

[0048] Figure 8 This is a schematic diagram of the structure of the electronic device provided in an embodiment of the present invention. Detailed Implementation

[0049] 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, and 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.

[0050] This invention provides an image saturation adjustment method, apparatus, electronic device, and computer-readable storage medium. Specifically, this invention provides an image saturation adjustment method applicable to an image saturation adjustment apparatus, which can be integrated into an electronic device.

[0051] The electronic device can be a terminal or other device, including but not limited to mobile terminals and fixed terminals. For example, mobile terminals include but are not limited to smartphones, smartwatches, tablets, laptops, smart vehicles, etc., while fixed terminals include but are not limited to desktop computers, smart TVs, etc.

[0052] The electronic device can also be a server or other similar device. The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms, but it is not limited to these.

[0053] The image saturation adjustment method of this invention can be implemented by a server or by a combination of a terminal and a server.

[0054] The following example illustrates this image saturation adjustment method using both a terminal and a server.

[0055] like Figure 1 As shown, the saturation adjustment system provided in this embodiment of the invention includes a terminal 10 and a server 20, etc.; the terminal 10 and the server 20 are connected via a network, such as a wired or wireless network, etc., wherein the server 20 can exist as an electronic device that sends the image to be displayed to the terminal 10.

[0056] Terminal 10 can be used to acquire a hue histogram of an image to be displayed, determine a set of hue processing weights corresponding to several preset hue intervals based on the hue histogram, acquire a luminance histogram of the image to be displayed, determine a set of luminance processing weights corresponding to several luminance intervals based on the luminance histogram, acquire a saturation histogram of the image to be displayed, determine an initial saturation weight set of the image to be displayed based on the hue histogram, the luminance histogram, and the saturation histogram, perform a fusion calculation on the initial saturation weight set based on the hue processing weight set and the luminance processing weight set to obtain a target saturation weight set, and adjust the saturation of the image to be displayed using the target saturation weight set.

[0057] Terminal 10 can display images with saturation adjusted.

[0058] It is understood that, in some embodiments, the image to be displayed provided by server 20 may also be directly stored in terminal 10, and this embodiment of the present invention does not limit this.

[0059] In other embodiments, the step of determining the target saturation weight set performed by terminal 10 can also be performed by server 20. For example, after obtaining the target saturation weight set, server 20 can send the target saturation weight set to terminal 10, so that terminal 10 can adjust the saturation of the image to be displayed using the target saturation weight set.

[0060] Alternatively, server 20 can send the image with saturation adjusted to terminal 10 for display, and so on.

[0061] The following sections provide detailed descriptions of each example. It should be noted that the order in which the embodiments are described is not intended to limit the preferred order of the embodiments.

[0062] The embodiments of the present invention will be described from the perspective of an image saturation adjustment device, which can be integrated into a server and / or a terminal.

[0063] like Figure 2 As shown, the specific process of the image saturation adjustment method in this embodiment can be as follows:

[0064] 201. Obtain the hue histogram of the image to be displayed, and determine a set of hue processing weights corresponding to several preset hue intervals based on the hue histogram.

[0065] The image to be displayed can be a single image, or an image frame from a video or GIF; this embodiment of the invention does not limit this.

[0066] Specifically, the tone histogram is obtained statistically based on the tone information of the image to be displayed. The step "obtain the tone histogram of the image to be displayed" may include:

[0067] Obtain the image to be displayed, perform tonal feature statistics on the image to be displayed, and determine the tonal histogram of the image to be displayed in several preset tonal ranges.

[0068] The generation of hue histograms can be based on the generation algorithm set in the server or terminal, without requiring additional hardware consumption.

[0069] The hue range can be a range generated based on the hue, for example, it can be like this: Figure 3 As shown, the hue can be divided into 24 hue ranges, etc. The embodiments of the present invention do not limit the number of hue ranges.

[0070] In the HIS color control, such as Figure 4As shown, in hue H, the six primary colors RGBYCM uniformly occupy a 60° interval. In this embodiment of the invention, based on the hue histogram, it can be determined which of the six primary color intervals are the target primary color intervals, i.e., the step "determining a set of hue processing weights corresponding to a preset number of hue intervals based on the hue histogram" can specifically include:

[0071] Based on the hue statistics values ​​corresponding to each hue interval in the hue histogram, a target hue interval that meets the preset hue processing conditions and a target primary color interval corresponding to the target hue interval are determined.

[0072] Determine the primary color processing weights corresponding to the target primary color intervals, and calculate the set of hue processing weights corresponding to each hue interval based on the primary color processing weights and the hue statistics corresponding to each hue interval.

[0073] Taking a hue range of 24 as an example, the correspondence between the hue range and the primary color range can be (22,23,0,1) corresponding to R, (2,3,4,5) corresponding to Y, (6,7,8,9) corresponding to G, and so on.

[0074] The hue processing condition can be that the statistical value of the hue interval is greater than a preset threshold. In other words, if the statistical value of the hue interval is greater than the preset threshold, then the hue interval is the target hue interval. Alternatively, the hue processing condition can be that the statistical value of the base color interval is among the top three or greater than a preset threshold. In other words, if the statistical value of the base color interval is among the top three or greater than the preset threshold, then the base color interval is the target base color interval, and the hue interval corresponding to the target base color interval is the target hue interval.

[0075] For example, if the hue processing condition is that the statistical values ​​of the primary color intervals are ranked in the top three, the primary color processing weight can be hue_point = (A1, A2, A3), where the values ​​of A1 / A2 / A3 are [R, Y, G, C, B, M]. As per... Figure 3 Then hue_point = (G, C, Y).

[0076] Accordingly, the step "calculating the set of hue processing weights corresponding to each hue interval based on the primary color processing weights and the hue statistics corresponding to each hue interval" may include:

[0077] Based on the hue statistics (i.e. histogram statistics) corresponding to each hue range, normalization processing can be performed to obtain a one-dimensional array hue_num = (n0, n2, ..., n23);

[0078] Based on the primary color processing weight hue_point, a weight coefficient combination P_hue_point = (P1, P2, P3) is obtained by indexing in the preset lookup table LUT_hue_point;

[0079] After weighting hue_num based on hue_point and P_hue_point, normalization is performed to obtain the final hue processing weight set hue_num_a(na0,na2,……,na23).

[0080] The LUT_hue_point lookup table can be derived from accumulated experimental data.

[0081] The weighted calculation of hue_num based on hue_point and P_hue_point can be assumed to be hue_point = (G,C,Y), where G corresponds to the bars of the hue axis (6,7,8,9). Therefore, (n6,n7,n8,n9) need to be multiplied by P1 respectively, and so on.

[0082] 202. Obtain the brightness histogram of the image to be displayed, and determine a set of brightness processing weights corresponding to several brightness intervals based on the brightness histogram.

[0083] The brightness range can be a range generated based on brightness, for example, it can be like this: Figure 5 As shown, the brightness can be divided into 128 brightness intervals, etc. The embodiments of the present invention do not limit the number of brightness intervals.

[0084] like Figure 5 As shown, there are a total of 128 statistical bars. Taking an 8-bit signal as an example, each bar represents two signal values. For example, the signal amplitudes represented by statistical bar 0 are 0 and 1, respectively.

[0085] Optionally, the step "obtaining the luminance histogram of the image to be displayed, and determining a set of luminance processing weights corresponding to several luminance intervals based on the luminance histogram" may specifically include:

[0086] Perform brightness feature statistics on the image to be displayed to determine the brightness histogram of the image to be displayed;

[0087] Calculate the first brightness statistical value corresponding to the first brightness interval of the preset first number based on the brightness histogram;

[0088] Based on the first brightness statistics, determine the brightness processing weight corresponding to each of the first brightness intervals;

[0089] Based on the brightness processing weights and the brightness statistics corresponding to each of the first brightness intervals, calculate the set of brightness processing weights corresponding to each of the first brightness intervals.

[0090] The first brightness interval can be different from the brightness intervals in the brightness histogram. For example, 128 brightness intervals can be accumulated into 9 first brightness intervals. Specifically, the intervals can be divided evenly or unevenly.

[0091] The first brightness statistic can be obtained by calculating the percentage of the actual statistical value of each first brightness interval and then rounding it down. For example, the first brightness statistic can be expressed as luma_num = (n1, n2, n3, n4, ..., n9).

[0092] Specifically, determining the brightness processing weight corresponding to each of the first brightness intervals can be achieved by indexing Luma_num in the lookup table LUT_Luma_point to obtain a weight coefficient combination P_Luma_point = (P1, P2, P3, P4, ..., P9). The LUT_Luma_point lookup table can be derived from accumulated experimental data.

[0093] Optionally, the step "calculating the set of brightness processing weights corresponding to each of the first brightness intervals based on the brightness processing weights and the brightness statistics corresponding to each of the first brightness intervals" may specifically include:

[0094] The final luminance processing weight set Luma_num_a(nb1,nb2,nb3,nb4,……,nb9) is obtained by weighting Luma_num based on Luma_point1 and P_Luma_point and then normalizing it again.

[0095] 203. Obtain the saturation histogram of the image to be displayed, and determine the initial saturation weight set of the image to be displayed based on the hue histogram, the brightness histogram and the saturation histogram.

[0096] In this embodiment of the invention, the saturation histogram of the image to be displayed can be obtained, and an initial saturation weight set can be obtained by searching the database based on the characteristics of the hue, brightness, and saturation histogram.

[0097] The step "obtaining the saturation histogram of the image to be displayed, and determining the initial saturation weight set of the image to be displayed based on the hue histogram, the brightness histogram, and the saturation histogram" may specifically include:

[0098] Obtain the saturation histogram of the image to be displayed, perform feature calculation on the saturation histogram, and determine the target saturation feature corresponding to the saturation histogram;

[0099] Based on the hue statistics corresponding to each hue interval of the hue histogram, at least one target primary color interval corresponding to the hue histogram is determined;

[0100] Based on the target primary color range, the target hue feature corresponding to the hue histogram is obtained from the correspondence between the preset primary color range and the hue feature;

[0101] Calculate the second brightness statistical value corresponding to the second brightness interval under the preset second number of the brightness histogram, where the second number is the same as the number of the target primary color interval;

[0102] Based on the second brightness statistics, the target brightness feature corresponding to the brightness histogram is obtained from the preset correspondence between brightness statistics and brightness features;

[0103] Based on the target saturation features, target hue features, and target brightness features, the initial saturation weight set of the image to be displayed is obtained from the preset target mapping relationship.

[0104] For example, hue_point = (A1, A2, A3) can be used as an index to find a feature number in the lookup table LUT1, which is then used as the feature number HUE_N (i.e., the target hue feature) of the hue histogram. The obtained saturation histogram is then used as input, and after feature calculation, a feature number SAT_N of the saturation histogram is obtained.

[0105] Optionally, the second number of second brightness intervals can be different from the brightness intervals. For example, based on the obtained brightness histogram, an initial statistical value with only 3 second brightness intervals is obtained by summing them up, and then the percentage is calculated and rounded to obtain a statistical combination (i.e., the second brightness statistical value) luma_point = (Q1, Q2, Q3).

[0106] Using luma_point = (Q1, Q2, Q3) as the index, a feature number is obtained by searching in the lookup table LUT2, which is used as the feature number LUMA_N of the brightness histogram;

[0107] Furthermore, based on (HUE_N,LUMA_N,SAT_N), an index can be found in the saturation adjustment curve database LUT3 to obtain a basic saturation adjustment list (i.e., the initial saturation weight set) f1 = (K1,K2,……,K9).

[0108] The element values ​​in the list represent the corresponding adjustment offsets, which can be positive or negative.

[0109] 204. Based on the hue processing weight set and the brightness processing weight set, the initial saturation weight set is fused and calculated to obtain the target saturation weight set.

[0110] In this embodiment of the invention, the basic saturation adjustment curves can be weighted according to the Hue-axis adjustment intensity list hue_num_a(na0,na2,……,na23) and the Luma-axis adjustment intensity list Luma_num_a(nb1,nb2,nb3,nb4,……,nb9) to obtain the target saturation weight set.

[0111] In some optional examples, such as Figure 6 As shown, the basic saturation adjustment curves can be weighted according to the Hue-axis adjustment intensity list hue_num_a(na0,na2,……,na23) to obtain a two-dimensional table of saturation adjustment based on the Hue axis. Then, according to the Luma-axis adjustment intensity list Luma_num_a(nb1,nb2,nb3,nb4,……,nb9), the two-dimensional table of saturation adjustment based on the Hue axis can be weighted to obtain a three-dimensional table of saturation adjustment based on the Luma axis and the Hue axis.

[0112] In other words, the step "based on the hue processing weight set and the luminance processing weight set, perform a fusion calculation on the initial saturation weight set to obtain the target saturation weight set" includes:

[0113] The hue processing weight set and the initial saturation weight set are fused and calculated to obtain a two-dimensional candidate saturation weight set;

[0114] The brightness processing weight set and the candidate saturation weight set are fused together to obtain a three-dimensional target saturation weight set.

[0115] The step "fusing the hue processing weight set with the initial saturation weight set to obtain a two-dimensional candidate saturation weight set" may specifically include:

[0116] Based on the number of tone processing weights in the tone processing weight set, the one-dimensional initial saturation weight set is adjusted to a two-dimensional first saturation weight set;

[0117] The saturation weights in the first saturation weight set and the hue processing weights in the hue processing weight set are weighted and calculated to obtain a two-dimensional candidate saturation weight set.

[0118] For example, the basic saturation adjustment list f1 can be expanded from a one-dimensional array into a two-dimensional array F2(i,j) based on the number of parameters h_n of the intensity list hue_num_a according to the Hue axis. The number of columns of F2 corresponds to the number of parameters h_n of hue_num_a.

[0119] The expanded two-dimensional array F2 is adjusted a second time based on hue_num_a. Specifically, the parameter corresponding to hue_num_a is multiplied by the specified column of the corresponding two-dimensional array. For example, the adjustment list obtained by multiplying na2 by each element of F2(i, 2) in turn is used as the saturation adjustment list based on the second scale interval of the Hue axis, and so on.

[0120] The step “” involves fusing the brightness processing weight set with the candidate saturation weight set to obtain a three-dimensional target saturation weight set, including:

[0121] Based on the number of brightness processing weights in the brightness processing weight set, the two-dimensional candidate saturation weight set is adjusted into a three-dimensional second saturation weight set;

[0122] The saturation weights in the second saturation weight set and the luminance processing weights in the luminance processing weight set are weighted and calculated to obtain a three-dimensional target saturation weight set.

[0123] For example, the Hue-axis-based saturation adjustment two-dimensional table F2 can be expanded from a two-dimensional array into a three-dimensional array F3(i,j,k) based on the number of parameters L_n of the intensity list Luma_num_a. The number of layers in F3 corresponds to the number of parameters L_n of Luma_num_a.

[0124] The expanded 3D array F3 is adjusted a second time based on Luma_num_a. Specifically, the parameter corresponding to Luma_num_a is multiplied by all elements of the 2D array corresponding to the layer number. For example, the adjustment list obtained by multiplying nb3 by each element of F3(i, j, 3) in sequence is used as the saturation adjustment list based on the Hue axis based on the third scale interval of the Luma axis, and so on.

[0125] 205. Adjust the saturation of the image to be displayed using the target saturation weight set.

[0126] Furthermore, the adjustment 3D table can be refreshed to the underlying layer in real time for application, enabling real-time dynamic adjustment of the image color.

[0127] As can be seen from the above, the embodiments of the present invention can obtain the hue histogram of the image to be displayed, determine a set of hue processing weights corresponding to several preset hue intervals based on the hue histogram, obtain the luminance histogram of the image to be displayed, determine a set of luminance processing weights corresponding to several luminance intervals based on the luminance histogram, obtain the saturation histogram of the image to be displayed, determine an initial saturation weight set of the image to be displayed based on the hue histogram, the luminance histogram, and the saturation histogram, perform a fusion calculation on the initial saturation weight set based on the hue processing weight set and the luminance processing weight set to obtain a target saturation weight set, and adjust the saturation of the image to be displayed using the target saturation weight set. Since the target saturation weight set corresponding to the image to be displayed is dynamically determined based on the hue, luminance, and saturation of the image in the embodiments of the present invention, the saturation of the image can be dynamically adjusted, improving the saturation adjustment effect of the image and enhancing the user's visual experience.

[0128] To better implement the above methods, the present invention also provides an image saturation adjustment device.

[0129] refer to Figure 7 The device includes:

[0130] The tone weight determination unit 701 can be used to obtain the tone histogram of the image to be displayed, and determine a set of tone processing weights corresponding to a preset number of tone intervals based on the tone histogram.

[0131] The brightness weight determination unit 702 can be used to obtain the brightness histogram of the image to be displayed, and determine a set of brightness processing weights corresponding to several brightness intervals based on the brightness histogram.

[0132] The initial saturation weight determination unit 703 can be used to obtain the saturation histogram of the image to be displayed, and determine the initial saturation weight set of the image to be displayed based on the hue histogram, the brightness histogram and the saturation histogram.

[0133] The target saturation weight determination unit 704 can be used to perform a fusion calculation on the initial saturation weight set based on the hue processing weight set and the brightness processing weight set to obtain the target saturation weight set.

[0134] The saturation adjustment unit 705 can be used to adjust the saturation of the image to be displayed by means of the target saturation weight set.

[0135] In some optional embodiments, the brightness weight determination unit 702 can be used to acquire an image to be displayed, perform hue feature statistics on the image to be displayed, and determine the hue histogram of the image to be displayed in a preset number of hue intervals.

[0136] Based on the hue statistics values ​​corresponding to each hue interval in the hue histogram, a target hue interval that meets the preset hue processing conditions and a target primary color interval corresponding to the target hue interval are determined.

[0137] Determine the primary color processing weights corresponding to the target primary color intervals, and calculate the set of hue processing weights corresponding to each hue interval based on the primary color processing weights and the hue statistics corresponding to each hue interval.

[0138] In some optional embodiments, the brightness weight determination unit 702 can be used to perform brightness feature statistics on the image to be displayed and determine the brightness histogram of the image to be displayed;

[0139] Calculate the first brightness statistical value corresponding to the first brightness interval of the preset first number based on the brightness histogram;

[0140] Based on the first brightness statistics, determine the brightness processing weight corresponding to each of the first brightness intervals;

[0141] Based on the brightness processing weights and the brightness statistics corresponding to each of the first brightness intervals, calculate the set of brightness processing weights corresponding to each of the first brightness intervals.

[0142] In some optional embodiments, the initial saturation weight determination unit 703 can be used to obtain the saturation histogram of the image to be displayed, perform feature calculation on the saturation histogram, and determine the target saturation feature corresponding to the saturation histogram;

[0143] Based on the hue statistics corresponding to each hue interval of the hue histogram, at least one target primary color interval corresponding to the hue histogram is determined;

[0144] Based on the target primary color range, the target hue feature corresponding to the hue histogram is obtained from the correspondence between the preset primary color range and the hue feature;

[0145] Calculate the second brightness statistical value corresponding to the second brightness interval under the preset second number of the brightness histogram, where the second number is the same as the number of the target primary color interval;

[0146] Based on the second brightness statistics, the target brightness feature corresponding to the brightness histogram is obtained from the preset correspondence between brightness statistics and brightness features;

[0147] Based on the target saturation features, target hue features, and target brightness features, the initial saturation weight set of the image to be displayed is obtained from the preset target mapping relationship.

[0148] In some optional embodiments, the target saturation weight determination unit 704 can be used to fuse the hue processing weight set with the initial saturation weight set to obtain a two-dimensional candidate saturation weight set.

[0149] The brightness processing weight set and the candidate saturation weight set are fused together to obtain a three-dimensional target saturation weight set.

[0150] In some optional embodiments, the target saturation weight determination unit 704 can be used to adjust the one-dimensional initial saturation weight set into a two-dimensional first saturation weight set according to the number of hue processing weights in the hue processing weight set.

[0151] The saturation weights in the first saturation weight set and the hue processing weights in the hue processing weight set are weighted and calculated to obtain a two-dimensional candidate saturation weight set.

[0152] In some optional embodiments, the target saturation weight determination unit can be used to adjust the two-dimensional candidate saturation weight set into a three-dimensional second saturation weight set according to the number of luminance processing weights in the luminance processing weight set.

[0153] The saturation weights in the second saturation weight set and the luminance processing weights in the luminance processing weight set are weighted and calculated to obtain a three-dimensional target saturation weight set.

[0154] As can be seen from the above, the image saturation adjustment device can obtain the hue histogram of the image to be displayed, determine a set of hue processing weights corresponding to several preset hue intervals based on the hue histogram, obtain the luminance histogram of the image to be displayed, determine a set of luminance processing weights corresponding to several luminance intervals based on the luminance histogram, obtain the saturation histogram of the image to be displayed, determine the initial saturation weight set of the image to be displayed based on the hue histogram, the luminance histogram, and the saturation histogram, perform a fusion calculation on the initial saturation weight set based on the hue processing weight set and the luminance processing weight set to obtain the target saturation weight set, and adjust the saturation of the image to be displayed using the target saturation weight set. Since in this embodiment of the invention, the target saturation weight set corresponding to the image to be displayed is dynamically determined based on the hue, luminance, and saturation of the image to be displayed, the saturation of the image can be dynamically adjusted, improving the saturation adjustment effect of the image and enhancing the user's visual experience.

[0155] Furthermore, embodiments of the present invention also provide an electronic device, which may be a terminal or a server, etc. Figure 8 As shown, it illustrates a structural schematic diagram of the electronic device involved in an embodiment of the present invention, specifically:

[0156] The electronic device may include a radio frequency (RF) circuit 801, a memory 802 including one or more computer-readable storage media, an input unit 803, a display unit 804, a sensor 805, an audio circuit 806, a wireless Fidelity (WiFi) module 807, a processor 808 including one or more processing cores, and a power supply 809, etc. Those skilled in the art will understand that... Figure 8 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0157] in:

[0158] RF circuit 801 can be used for receiving and transmitting signals during information transmission or calls. Specifically, it receives downlink information from the base station and hands it over to one or more processors 808 for processing; additionally, it transmits uplink data to the base station. Typically, RF circuit 801 includes, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, a low-noise amplifier (LNA), a duplexer, etc. Furthermore, RF circuit 801 can also communicate wirelessly with networks and other devices. Wireless communication can use any communication standard or protocol, including but not limited to GSM, GPRS, CDMA, WCDMA, LTE, email, and SMS.

[0159] The memory 802 can be used to store software programs and modules. The processor 808 executes various functional applications and data processing by running the software programs and modules stored in the memory 802. The memory 802 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device (such as audio data, telephone directory, etc.). In addition, the memory 802 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 802 may also include a memory controller to provide access to the memory 802 for the processor 808 and the input unit 803.

[0160] Input unit 803 can be used to receive input digital or character information, and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control. Specifically, in one embodiment, input unit 803 may include a touch-sensitive surface and other input devices. A touch-sensitive surface, also known as a touch display or touchpad, can collect user touch operations on or near it (e.g., user operations using fingers, styluses, or any suitable object or accessory on or near the touch-sensitive surface) and drive corresponding connection devices according to a pre-set program. Optionally, the touch-sensitive surface may include a touch detection device and a touch controller. The touch detection device detects the user's touch orientation and the signal generated by the touch operation, transmitting the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, sends it to the processor 808, and can receive and execute commands from the processor 808. Furthermore, various types of touch-sensitive surfaces, such as resistive, capacitive, infrared, and surface acoustic wave, can be used. In addition to the touch-sensitive surface, input unit 803 may also include other input devices. Specifically, other input devices may include, but are not limited to, one or more of the following: physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, etc.

[0161] Display unit 804 can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of electronic devices. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof. Display unit 804 may include a display panel, optionally configured as a liquid crystal display (LCD), organic light-emitting diode (OLED), or similar form. Furthermore, a touch-sensitive surface may cover the display panel. When the touch-sensitive surface detects a touch operation on or near it, it transmits the information to processor 808 to determine the type of touch event. Subsequently, processor 808 provides corresponding visual output on the display panel according to the type of touch event. Although in Figure 8 In this context, the touch-sensitive surface and the display panel are two separate components for implementing input and output functions. However, in some embodiments, the touch-sensitive surface and the display panel can be integrated to achieve both input and output functions.

[0162] Electronic devices may also include at least one sensor 805, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel according to the ambient light level, and the proximity sensor can turn off the display panel and / or backlight when the electronic device is moved to the ear. As a type of motion sensor, a gravity acceleration sensor can detect the magnitude of acceleration in various directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that recognize the phone's posture (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometers, taps), etc. Other sensors that may be configured in electronic devices, such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, will not be described in detail here.

[0163] Audio circuitry 806, a speaker, and a microphone provide an audio interface between the user and the electronic device. Audio circuitry 806 converts received audio data into electrical signals, transmits them to the speaker, and the speaker converts them into sound signals for output. Conversely, the microphone converts collected sound signals into electrical signals, which are then received by audio circuitry 806, converted back into audio data, and processed by processor 808. The processed data is then transmitted via RF circuitry 801 to, for example, another electronic device, or output to memory 802 for further processing. Audio circuitry 806 may also include an earphone jack to facilitate communication between peripheral headphones and the electronic device.

[0164] WiFi is a short-range wireless transmission technology. Electronic devices using the WiFi module 807 can help users send and receive emails, browse web pages, and access streaming media, providing users with wireless broadband internet access. Although Figure 8 WiFi module 807 is shown, but it is understood that it is not a necessary component of an electronic device and can be omitted as needed without changing the nature of the invention.

[0165] The processor 808 is the control center of the electronic device, connecting various parts of the phone via various interfaces and lines. It executes various functions and processes data by running or executing software programs and / or modules stored in the memory 802, and by calling data stored in the memory 802. Optionally, the processor 808 may include one or more processing cores; preferably, the processor 808 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 808.

[0166] The electronic device also includes a power supply 809 (such as a battery) that supplies power to various components. Preferably, the power supply can be logically connected to the processor 808 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 809 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0167] Although not shown, the electronic device may also include a camera, Bluetooth module, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 808 in the electronic device loads the executable files corresponding to the processes of one or more applications into the memory 802 according to the following instructions, and the processor 808 runs the applications stored in the memory 802 to realize various functions, as follows:

[0168] Obtain the hue histogram of the image to be displayed, and determine a set of hue processing weights corresponding to several preset hue intervals based on the hue histogram;

[0169] Obtain the brightness histogram of the image to be displayed, and determine a set of brightness processing weights corresponding to several brightness intervals based on the brightness histogram;

[0170] Obtain the saturation histogram of the image to be displayed, and determine the initial saturation weight set of the image to be displayed based on the hue histogram, the brightness histogram, and the saturation histogram;

[0171] Based on the hue processing weight set and the brightness processing weight set, the initial saturation weight set is fused and calculated to obtain the target saturation weight set;

[0172] The saturation of the image to be displayed is adjusted using the target saturation weight set.

[0173] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0174] To this end, embodiments of the present invention provide a computer-readable storage medium storing a plurality of instructions that can be loaded by a processor to execute steps in any of the image saturation adjustment methods provided in the embodiments of the present invention. For example, the instructions can execute the following steps:

[0175] Obtain the hue histogram of the image to be displayed, and determine a set of hue processing weights corresponding to several preset hue intervals based on the hue histogram;

[0176] Obtain the brightness histogram of the image to be displayed, and determine a set of brightness processing weights corresponding to several brightness intervals based on the brightness histogram;

[0177] Obtain the saturation histogram of the image to be displayed, and determine the initial saturation weight set of the image to be displayed based on the hue histogram, the brightness histogram, and the saturation histogram;

[0178] Based on the hue processing weight set and the brightness processing weight set, the initial saturation weight set is fused and calculated to obtain the target saturation weight set;

[0179] The saturation of the image to be displayed is adjusted using the target saturation weight set.

[0180] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0181] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0182] Since the instructions stored in the computer-readable storage medium can execute the steps in any of the image saturation adjustment methods provided in the embodiments of the present invention, the beneficial effects that any of the image saturation adjustment methods provided in the embodiments of the present invention can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.

[0183] According to one aspect of this application, a computer program product or computer program is also provided, comprising computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the methods provided in the various optional implementations of the above embodiments.

[0184] The foregoing has provided a detailed description of an image saturation adjustment method, apparatus, electronic device, and storage medium provided by embodiments of the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for adjusting image saturation, characterized in that, include: Obtain the hue histogram of the image to be displayed, and determine a set of hue processing weights corresponding to several preset hue intervals based on the hue histogram; Obtain the brightness histogram of the image to be displayed, and determine a set of brightness processing weights corresponding to several brightness intervals based on the brightness histogram; Obtain the saturation histogram of the image to be displayed, and determine the initial saturation weight set of the image to be displayed based on the hue histogram, the brightness histogram, and the saturation histogram; Based on the hue processing weight set and the brightness processing weight set, the initial saturation weight set is fused and calculated to obtain the target saturation weight set; The saturation of the image to be displayed is adjusted using the target saturation weight set. The step of obtaining the saturation histogram of the image to be displayed, and determining the initial saturation weight set of the image to be displayed based on the hue histogram, the brightness histogram, and the saturation histogram, includes: Obtain the saturation histogram of the image to be displayed, perform feature calculation on the saturation histogram, and determine the target saturation feature corresponding to the saturation histogram; Based on the hue statistics corresponding to each hue interval of the hue histogram, at least one target primary color interval corresponding to the hue histogram is determined; Based on the target primary color range, the target hue feature corresponding to the hue histogram is obtained from the correspondence between the preset primary color range and the hue feature; Calculate the second brightness statistical value corresponding to the second brightness interval under the preset second number of the brightness histogram, where the second number is the same as the number of the target primary color interval; Based on the second brightness statistics, the target brightness feature corresponding to the brightness histogram is obtained from the preset correspondence between brightness statistics and brightness features; Based on the target saturation features, target hue features, and target brightness features, the initial saturation weight set of the image to be displayed is obtained from the preset target mapping relationship; the initial saturation weight set is a saturation adjustment list obtained from the saturation adjustment curve database, and the element values ​​in the saturation adjustment list represent the corresponding adjustment offsets.

2. The image saturation adjustment method according to claim 1, characterized in that, The step of obtaining the tone histogram of the image to be displayed, and determining a set of tone processing weights corresponding to several preset tone intervals based on the tone histogram, includes: Obtain the image to be displayed, perform tonal feature statistics on the image to be displayed, and determine the tonal histogram of the image to be displayed in several preset tonal ranges; Based on the hue statistics values ​​corresponding to each hue interval in the hue histogram, a target hue interval that meets the preset hue processing conditions and a target primary color interval corresponding to the target hue interval are determined. Determine the primary color processing weights corresponding to the target primary color intervals, and calculate the set of hue processing weights corresponding to each hue interval based on the primary color processing weights and the hue statistics corresponding to each hue interval.

3. The image saturation adjustment method according to claim 1, characterized in that, The step of obtaining the brightness histogram of the image to be displayed, and determining a set of brightness processing weights corresponding to several brightness intervals based on the brightness histogram, includes: Perform brightness feature statistics on the image to be displayed to determine the brightness histogram of the image to be displayed; Calculate the first brightness statistical value corresponding to the first brightness interval of the preset first number based on the brightness histogram; Based on the first brightness statistics, determine the brightness processing weight corresponding to each of the first brightness intervals; Based on the brightness processing weights and the brightness statistics corresponding to each of the first brightness intervals, calculate the set of brightness processing weights corresponding to each of the first brightness intervals.

4. The image saturation adjustment method according to claim 1, characterized in that, The step of fusing the initial saturation weight set based on the hue processing weight set and the luminance processing weight set to obtain the target saturation weight set includes: The hue processing weight set and the initial saturation weight set are fused and calculated to obtain a two-dimensional candidate saturation weight set; The brightness processing weight set and the candidate saturation weight set are fused together to obtain a three-dimensional target saturation weight set.

5. The image saturation adjustment method according to claim 4, characterized in that, The step of fusing the hue processing weight set with the initial saturation weight set to obtain a two-dimensional candidate saturation weight set includes: Based on the number of tone processing weights in the tone processing weight set, the one-dimensional initial saturation weight set is adjusted to a two-dimensional first saturation weight set; The saturation weights in the first saturation weight set and the hue processing weights in the hue processing weight set are weighted and calculated to obtain a two-dimensional candidate saturation weight set.

6. The image saturation adjustment method according to claim 4, characterized in that, The step of fusing the brightness processing weight set with the candidate saturation weight set to obtain a three-dimensional target saturation weight set includes: Based on the number of brightness processing weights in the brightness processing weight set, the two-dimensional candidate saturation weight set is adjusted into a three-dimensional second saturation weight set; The saturation weights in the second saturation weight set and the luminance processing weights in the luminance processing weight set are weighted and calculated to obtain a three-dimensional target saturation weight set.

7. An image saturation adjustment device, characterized in that, include: The tone weight determination unit is used to obtain the tone histogram of the image to be displayed, and determine a set of tone processing weights corresponding to a preset number of tone intervals based on the tone histogram. A brightness weight determination unit is used to obtain the brightness histogram of the image to be displayed and determine a set of brightness processing weights corresponding to several brightness intervals based on the brightness histogram. An initial saturation weight determination unit is used to obtain the saturation histogram of the image to be displayed, and determine the initial saturation weight set of the image to be displayed based on the hue histogram, the brightness histogram and the saturation histogram. The target saturation weight determination unit is used to perform a fusion calculation on the initial saturation weight set based on the hue processing weight set and the brightness processing weight set to obtain the target saturation weight set. A saturation adjustment unit is used to adjust the saturation of the image to be displayed using the target saturation weight set. The initial saturation weight determination unit is specifically used for: Obtain the saturation histogram of the image to be displayed, perform feature calculation on the saturation histogram, and determine the target saturation feature corresponding to the saturation histogram; Based on the hue statistics corresponding to each hue interval of the hue histogram, at least one target primary color interval corresponding to the hue histogram is determined; Based on the target primary color range, the target hue feature corresponding to the hue histogram is obtained from the correspondence between the preset primary color range and the hue feature; Calculate the second brightness statistical value corresponding to the second brightness interval under the preset second number of the brightness histogram, where the second number is the same as the number of the target primary color interval; Based on the second brightness statistics, the target brightness feature corresponding to the brightness histogram is obtained from the preset correspondence between brightness statistics and brightness features; Based on the target saturation features, target hue features, and target brightness features, the initial saturation weight set of the image to be displayed is obtained from the preset target mapping relationship; the initial saturation weight set is a saturation adjustment list obtained from the saturation adjustment curve database, and the element values ​​in the saturation adjustment list represent the corresponding adjustment offsets.

8. An electronic device, characterized in that, It includes a memory and a processor; the memory stores an application program, and the processor is used to run the application program within the memory to perform the steps in the image saturation adjustment method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a plurality of instructions adapted for loading by a processor to perform the steps of the image saturation adjustment method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the image saturation adjustment method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method for video enhancement and apparatus thereof

    CN101340510A

  • Vehicle color recognition method and device

    CN106384117A