An Adaptive Saturation Enhancement Method
By performing HSV conversion and pyramid transition techniques on the image, the problem of uneven local saturation adjustment in color image enhancement was solved, achieving both overall and local color enhancement effects.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-26
- Publication Date
- 2026-03-10
AI Technical Summary
Existing color image enhancement algorithms cannot effectively differentiate local areas, resulting in over- or under-saturation adjustments in local areas, making it difficult to solve the transition problem between different regions.
By performing HSV conversion on the image, calculating the local saturation enhancement ratio, and using pyramid transition technology to achieve a uniform transition, the image is finally converted back to RGB space for enhancement, combining the overall and local enhancement ratios.
This solves the problem of intensity transition in different regions of an image, making the image more vibrant and with more distinct layers.
Smart Images

Figure CN115496686B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of image color enhancement, and more particularly to an adaptive saturation enhancement method. Background Technology
[0002] During the transmission of an image from the image source to the image display terminal, circuit noise and transmission loss can cause a decrease in image quality. Therefore, color image enhancement is of great significance in improving the visual effect of images displayed on the image display terminal.
[0003] Existing color image enhancement algorithms typically employ global and local saturation enhancement; however, they cannot target specific areas for enhancement, resulting in either over- or under-adjustment of local saturation. Local saturation enhancement often struggles to handle transitions between different regions and intensities. Summary of the Invention
[0004] The purpose of this section is to outline some aspects of embodiments of the present invention and to briefly describe some preferred embodiments. Simplifications or omissions may be made in this section, as well as in the abstract and title of this application, to avoid obscuring the purpose of these documents; however, such simplifications or omissions should not be construed as limiting the scope of the invention.
[0005] In view of the aforementioned existing problems, the present invention is proposed.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: including, an image to be enhanced Perform HSV conversion to obtain the image. according to Image saturation component IS m×n Obtain the saturation enhancement ratio corresponding to each saturation range; based on the image to be enhanced... The saturation of each pixel and its corresponding saturation enhancement ratio are used to obtain a scale map IR composed of the saturation enhancement ratios. m×n ; Comparison chart IR m×n Perform a pyramid transition to obtain the scale diagram IR′ after the transition. m×n ; Calculate the scale diagram IR′ after the transition. m×n mean r avg According to the mean r avg Calculate the local enhancement ratio for each pixel to adjust the saturation component IS. m×n Enhancement is performed; the enhanced image I HS′V Perform RGB conversion; where m is the number of rows in the image and n is the number of columns in the image.
[0007] As a preferred embodiment of the adaptive saturation enhancement method described in this invention, the HSV conversion includes extracting the maximum value Max and the minimum value Min from R, G, and B, and calculating H, S, and V based on the maximum value Max and the minimum value Min, respectively; wherein V = Max, S = (Max - Min) / Max; and S is IS. m×n If R is the maximum value Max, then let H = (RB) / (Max - Min); otherwise, let H = 1 + (BR) / (Max - Min); thus obtaining the image.
[0008] As a preferred embodiment of the adaptive saturation enhancement method of the present invention, the step of calculating the local enhancement ratio includes: assuming the saturation segmentation interval sequence is {a1, a2, ..., a...} n}, in the saturation component IS m×n In, it is located in the interval [a i-1 ,a i The enhancement ratio corresponding to the saturation in ) is r i-1 The corresponding strength coefficient is β i-1 , i∈N + And 1≤i≤l, a i ∈[0,1], r i-1 ∈[1,∞), β i-1 ∈[0,1]; the highest saturation enhancement ratio is rMax∈[0,∞); it is in the interval [a i-1 ,a i The enhancement ratio corresponding to the saturation in ) is r i-1 for:
[0009] r i-1 =1+β i-1 ×rMax
[0010] In the formula, i is the index number of the saturation segment interval, and N + is a positive integer, and l is the number of segment intervals.
[0011] As a preferred embodiment of the adaptive saturation enhancement method of the present invention, it includes: based on the saturation component IS m×n The sequence is segmented, with intervals {0, 0.2, 0.5, 0.7, 0.9, 1}, and corresponding saturation intensity coefficients {0.2, 1, 0.6, 0.2, 0.1}. The maximum saturation enhancement ratio rMax = 0.5; the saturation enhancement ratio R1 corresponding to the low saturation interval [0, 0.2) is:
[0012] R1 = 1 + 0.2 × rMax
[0013] The saturation enhancement ratio R² corresponding to the low to medium saturation range [0.2, 0.5) is:
[0014] R² = 1 + rMax
[0015] The saturation enhancement ratio R3 corresponding to the medium-high saturation range [0.5, 0.7) is:
[0016] R3 = 1 + 0.6 × rMax
[0017] The saturation enhancement ratio R4 corresponding to the high saturation range [0.7, 0.9) is:
[0018] R4 = 1 + 0.2 × rMax
[0019] The saturation enhancement ratio R5 corresponding to extremely high saturation [0.9,1] is:
[0020] R5 = 1 + 0.1 × rMax.
[0021] As a preferred embodiment of the adaptive saturation enhancement method described in this invention, it includes: calculating the number of pyramid layers PyL:
[0022] PyL=round(log2(L)),L=min(m,n)
[0023] Comparison chart IR m×n A 0.5x downsampling process is performed, and this process is repeated using PyL 100 times to obtain the image pyramid. Then, bilinear interpolation is applied to the top layer of the pyramid to restore the image to be enhanced. The size is adjusted to achieve a uniform transition, resulting in a scale diagram IR′ after the transition. m×n ;
[0024] In the formula, L is the minimum side length of the image, which is the input for calculating the number of pyramid layers.
[0025] As a preferred embodiment of the adaptive saturation enhancement method described in this invention, calculating the local enhancement ratio of each pixel includes calculating the ratio map IR′. m×n mean r avg This is used as the overall saturation enhancement ratio; based on the overall saturation enhancement ratio, the local enhancement ratio r for each pixel is calculated. (x,y) :
[0026]
[0027] In the formula, (x, y) are the coordinates of the pixel in the image, x∈[1,m], y∈[1,n], IR′ (x,y) For the scale diagram IR′ m×n The value of the coordinate (x, y) in the middle.
[0028] As a preferred embodiment of the adaptive saturation enhancement method of the present invention, it includes: [the method] based on the local enhancement ratio r of each pixel... (x,y) For saturation component IS m×n Saturation IS at corresponding position (x,y) Enhancement:
[0029] IS′ (x,y) =r (x,y) ×IS (x,y)
[0030] In the formula, IS′ (x,y) This is for enhanced pixel saturation.
[0031] As a preferred embodiment of the adaptive saturation enhancement method of the present invention, it includes: converting the saturation-enhanced HSV back to the RGB space, that is:
[0032] I' RGB =T′(I HS′V ).
[0033] In the formula, T′ represents the inverse conversion from HSV to RGB space, and I′ represents the inverse conversion from HSV to RGB space. RGB For the RGB space image after saturation enhancement, I HS′V This is the HSV spatial image after enhancing the saturation component.
[0034] The beneficial effects of this invention are that it can solve the problem of intensity transition in different areas, making the image more vivid and the layers more distinct. Attached Figure Description
[0035] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the 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. Wherein:
[0036] Figure 1 This is a flowchart illustrating the adaptive saturation enhancement method according to the first embodiment of the present invention.
[0037] Figure 2 The image to be processed does not use the present invention.
[0038] Figure 3 The image is processed using the present invention. Detailed Implementation
[0039] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.
[0040] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0041] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0042] This invention is described in detail with reference to the schematic diagrams. When detailing the embodiments of this invention, for ease of explanation, the cross-sectional views illustrating the device structure may be partially enlarged, not adhering to the usual scale. Furthermore, the schematic diagrams are merely examples and should not be construed as limiting the scope of protection of this invention. In actual fabrication, the three-dimensional spatial dimensions of length, width, and depth should be included.
[0043] Furthermore, in the description of this invention, it should be noted that the terms "upper," "lower," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. These terms are used solely for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. In addition, the terms "first," "second," or "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0044] Unless otherwise explicitly specified and limited, the terms "installation," "connection," and "joining" in this invention should be interpreted broadly. For example, they can refer to fixed connections, detachable connections, or integral connections; similarly, they can refer to mechanical connections, electrical connections, or direct connections, or indirect connections through an intermediate medium, or internal connections between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0045] Example 1
[0046] Reference Figure 1This is the first embodiment of the present invention, which provides an adaptive saturation enhancement method, comprising:
[0047] S1: Image to be enhanced Perform HSV conversion to obtain the image.
[0048] Take the maximum value Max and the minimum value Min from R, G, and B, and calculate H, S, and V based on the maximum value Max and the minimum value Min respectively; where V = Max, S = (Max - Min) / Max; S is IS. m×n ;
[0049] If R is the maximum value Max, then let H = (RB) / (Max - Min); otherwise, let H = 1 + (BR) / (Max - Min); thus obtaining the image.
[0050] Where m is the number of image rows and n is the number of image columns.
[0051] In this implementation, the RGB value (24, 132, 29) is converted to HSV using the above conversion method to obtain HSV (128, 209, 132), which is the same as the theoretical value and achieves high accuracy.
[0052] S2: According to Image saturation component IS m×n Obtain the saturation enhancement ratio corresponding to each saturation range.
[0053] Let the saturation segmentation interval sequence be {a1, a2, ..., a...} n}, in the saturation component IS m×n In, it is located in the interval [a i-1 ,a i The enhancement ratio corresponding to the saturation in ) is r i-1 The corresponding strength coefficient is β i-1 , i∈N + And 1≤i≤l, a i ∈[0,1], r i-1 ∈[1,∞), β i-1 ∈[0,1]; the maximum saturation enhancement ratio is rMax∈[0,∞);
[0054] Located in the interval [a i-1 ,a i The enhancement ratio corresponding to the saturation in ) is r i-1 for:
[0055] r i-1 =1+β i-1 ×rMax
[0056] In the formula, i is the index number of the saturation segment interval, and N + is a positive integer, and l is the number of segment intervals.
[0057] S3: Based on the image to be enhanced The saturation of each pixel and its corresponding saturation enhancement ratio are used to obtain a scale map IR composed of the saturation enhancement ratios. m×n .
[0058] S4: Comparative IR plot m×n Perform a pyramid transition to obtain the scale diagram IR′ after the transition. m×n .
[0059] Calculate the number of pyramid levels using PyL:
[0060] PyL=round(log2(L)),L=min(m,n)
[0061] In the formula, L is the minimum side length of the image, which is the input for calculating the number of pyramid layers.
[0062] Comparison chart IR m×n A 0.5x downsampling process is performed, and this process is repeated using PyL 100 times to obtain the image pyramid. Then, bilinear interpolation is applied to the top layer of the pyramid to restore the image to be enhanced. The size is adjusted to achieve a uniform transition, resulting in a scale diagram IR′ after the transition. m×n ;
[0063] S5: Calculate the scale diagram IR′ after transition. m×n mean r avg According to the mean r avg Calculate the local enhancement ratio for each pixel to adjust the saturation component IS. m×n Enhance it.
[0064] Calculate the scale diagram IR′ m×n mean r avg This is used as the overall saturation enhancement ratio;
[0065] The local enhancement ratio r of each pixel is calculated based on the overall saturation enhancement ratio. (x,y) :
[0066]
[0067] In the formula, (x, y) are the coordinates of the pixel in the image, x∈[1,m], y∈[1,n], IR′ (x,y) For the scale diagram IR′ m×n The value of the coordinate (x, y) in the middle.
[0068] Furthermore, based on the local enhancement ratio r of each pixel(x,y) For saturation component IS m×n Saturation IS at corresponding position (x,y) Enhancement:
[0069] IS′ (x,y) =r (x,y) ×IS (x,y)
[0070] In the formula, IS′ (x,y) This is for enhanced pixel saturation.
[0071] S6: The enhanced image I HS′V Perform RGB conversion.
[0072] Convert the HSV color space with enhanced saturation back to RGB space, that is:
[0073] I' RGB =T′(I HS′V ).
[0074] In the formula, T′ represents the inverse conversion from HSV to RGB space, and I′ represents the inverse conversion from HSV to RGB space. RGB For the RGB space image after saturation enhancement, I HS′V This is the HSV spatial image after enhancing the saturation component.
[0075] The invention achieves local saturation enhancement through segmented processing, and uses image pyramid technology to achieve a smooth transition of enhancement intensity. Finally, it combines the average enhancement intensity and the smoothed local enhancement ratio to achieve overall and local enhancement, thereby improving color vibrancy and color gradation.
[0076] Example 2
[0077] This embodiment provides a calculation example for obtaining the saturation enhancement ratio corresponding to each saturation range, specifically including:
[0078] According to the saturation component IS m×n The sequence is segmented, and the segmented interval sequence is {0,0.2,0.5,0.7,0.9,1}. The saturation intensity coefficients of the corresponding intervals are {0.2,1,0.6,0.2,0.1}, and the maximum saturation enhancement ratio rMax = 0.5.
[0079] The saturation enhancement ratio R1 corresponding to the low saturation range [0, 0.2) is:
[0080] R1 = 1 + 0.2 × rMax
[0081] The saturation enhancement ratio R² corresponding to the low to medium saturation range [0.2, 0.5) is:
[0082] R² = 1 + rMax
[0083] The saturation enhancement ratio R3 corresponding to the medium-high saturation range [0.5, 0.7) is:
[0084] R3 = 1 + 0.6 × rMax
[0085] The saturation enhancement ratio R4 corresponding to the high saturation range [0.7, 0.9) is:
[0086] R4 = 1 + 0.2 × rMax
[0087] The saturation enhancement ratio R5 corresponding to extremely high saturation [0.9,1] is:
[0088] R5 = 1 + 0.1 × rMax.
[0089] After the above processing, the saturation of the color image is enhanced. (Refer to...) Figure 2 and Figure 3 The two images are the image to be processed and the image processed by the overall and local saturation enhancement method of this invention, respectively. A comparison of the two images shows that the image processed by this invention has a more uniform overall color transition, and the local color contrast is significantly enhanced.
[0090] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A method of adaptive saturation enhancement, characterized by: Comprising, To enhance the image HSV conversion is performed to obtain an image ; According to Saturation component of the image , a saturation enhancement ratio corresponding to each saturation interval is obtained; According to the saturation of each pixel in the image to be enhanced and its corresponding saturation enhancement ratio, a ratio map composed of saturation enhancement ratios is obtained According to the saturation of each pixel in the image to be enhanced and its corresponding saturation enhancement ratio, a ratio map composed of saturation enhancement ratios is obtained ; Comparative Example performing pyramid transition, specifically, calculating pyramid layer number : ; To 0.5 times down-sampling, repeat times to get the image pyramid, and then restore the top layer image of the pyramid to the image to be enhanced by bilinear interpolation size, achieve uniform transition, get the transition ratio chart ; In the formula, is the minimum value of the image side length, which is the input of the pyramid layer calculation; a transitioned scale map a mean value each pixel based on the mean value to enhance the saturation component enhanced image RGB conversion is performed; wherein m is the number of image rows and n is the number of image columns.
2. The adaptive saturation enhancement method of claim 1, wherein: The HSV conversion comprises, The maximum value Max and the minimum value Min are taken out from R, G and B, and H, S and V are calculated according to the maximum value Max and the minimum value Min respectively; wherein, V=Max, S=(Max-Min) / Max; S is ; If R is the maximum value Max, then let H = (R - B) / (Max - Min); otherwise, let H = 1 + (B - R) / (Max - Min); thereby obtaining the image .
3. The method of adaptive saturation enhancement as claimed in claim 2, wherein: The step of calculating the local enhancement ratio comprises, Let the saturation segmentation interval sequence be , in the saturation component , the saturation corresponding to the enhancement ratio in the interval is , the corresponding intensity coefficient is , and , , , ; The maximum saturation enhancement ratio is ; The saturation in the interval corresponds to an enhancement ratio of is: ; where i is the saturation segment index number, is a positive integer, and / is the number of segment intervals.
4. The adaptive saturation enhancement method of claim 2, wherein: Comprising, According to the saturation component Segmentation is performed, and the segmentation interval sequence is The saturation intensity coefficients of the corresponding intervals are respectively The highest saturation enhancement ratio ; Low saturation interval Corresponding saturation enhancement ratio is: = ; Low-to-moderate saturation interval Corresponding saturation enhancement ratio is: = ; Mid-high saturation interval Corresponding saturation enhancement ratio is: = ; High saturation interval Corresponding saturation enhancement ratio is: = ; extremely high saturation corresponding saturation enhancement ratio is: = 。 5. The adaptive saturation enhancement method of claim 3 or 4, wherein: The step of calculating the local enhancement ratio for each pixel comprises, Computing the ratio plot the mean of as a global saturation enhancement ratio; calculating a local enhancement ratio for each pixel according to the overall saturation enhancement ratio : ; In the formula, (x, y) are the coordinates of the pixel in the image. , , For scale diagram The value of the coordinate (x, y) in the middle.
6. The adaptive saturation enhancement method of claim 5, wherein: Comprising, According to the local enhancement ratio of each pixel To the saturation component Saturation of the corresponding position Perform enhancement: ; In the formula, is the enhanced pixel saturation.
7. The adaptive saturation enhancement method of claim 6, wherein: Comprising, Comprising, Converting the saturation-enhanced HSV back to the RGB space, i.e.: ; wherein is the inverse conversion of HSV to RGB space, is the RGB space image after saturation enhancement, is the HSV space image after enhancement of the saturation component.
Citation Information
Patent Citations
NSCT (nonsubsampled contourlet transform) sonar image enhancement method based on HSV (hue, saturation and value) color space
CN102496144A
Image saturation nonlinear enhancement method
CN111161168A