Image color saturation enhancement method, computer device and readable medium

CN118822922BActive Publication Date: 2026-08-18SANECHIPS TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310365940.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-30
Publication Date
2026-08-18
Estimated Expiration
2043-03-30

AI Technical Summary

Technical Problem

[0003]目前相关技术中增强图像色彩饱和度的方案的缺陷在于:容易造成图像过饱和,且图像色彩饱和度增强范围无法调整

Benefits of technology

[0011]本公开实施例提供的图像色彩饱和度增强方法,包括:针对预设色彩格式的第一图像中的每个像素,根据像素的预设通道的值和预设阈值计算像素的增强系数;针对每个像素,根据像素的增强系数和预设通道的值,计算像素增强后的预设通道的值;根据每个像素增强后的预设通道的值更新第一图像中相应像素的预设通道的值,用以增强第一图像的色彩饱和度,得到第二图像;其中,在像素的预设通道的值和预设阈值满足预设条件的情况下,所述像素在第二图像中的色彩饱和度等于所述像素在第一图像中的色彩饱和度。本公开实施例通过设置阈值,在像素预设通道的值和预设阈值满足预设条件的情况下,不增强图像的色彩饱和度,可以避免图像色彩过饱和,且通过调整阈值可以灵活调整色彩增强的范围。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118822922B_ABST
    Figure CN118822922B_ABST
Patent Text Reader

Abstract

The present disclosure provides an image color saturation enhancement method, for each pixel in a first image of a preset color format, an enhancement coefficient of the pixel is calculated according to a value of a preset channel of the pixel and a preset threshold, and a value of the preset channel of the pixel after enhancement is calculated according to the enhancement coefficient of the pixel and the value of the preset channel; the value of the preset channel of the corresponding pixel in the first image is updated according to the value of the preset channel of each pixel after enhancement, so as to enhance the color saturation of the first image and obtain a second image; in the case that the value of the preset channel of the pixel and the preset threshold satisfy a preset condition, the color saturation of the pixel in the second image is equal to the color saturation of the pixel in the first image. In the case that the value of the preset channel of the pixel and the preset threshold satisfy the preset condition, the color saturation of the image is not enhanced, the color oversaturation of the image is avoided, and the range of color enhancement can be flexibly adjusted by adjusting the threshold. The present disclosure also provides a computer device and a readable medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of image processing technology, specifically to an image color saturation enhancement method, a computer device, and a readable medium. Background Technology

[0002] With the development of display technology, users have increasingly higher requirements for the quality of display images. High-saturation images can give people a better visual experience, while video images with dull colors and low saturation affect people's perception.

[0003] The current limitations of methods for enhancing image color saturation are that they can easily cause oversaturation and the range of color saturation enhancement cannot be adjusted. Summary of the Invention

[0004] This disclosure provides an image color saturation enhancement method, a computer device, and a readable medium.

[0005] In a first aspect, embodiments of this disclosure provide a method for enhancing image color saturation, including:

[0006] For each pixel in a first image with a preset color format, the enhancement coefficient of the pixel is calculated based on the value of the preset channel and a preset threshold.

[0007] For each pixel, the enhanced value of the preset channel is calculated based on the pixel's enhancement coefficient and the value of the preset channel.

[0008] The preset channel value of the corresponding pixel in the first image is updated according to the value of the preset channel after each pixel is enhanced, so as to enhance the color saturation of the first image and obtain the second image; wherein, when the preset channel value of the pixel and the preset threshold satisfy the preset conditions, the color saturation of the pixel in the second image is equal to the color saturation of the pixel in the first image.

[0009] In another aspect, embodiments of this disclosure also provide a computer device, including: one or more processors; a storage device having one or more programs stored thereon; and when the one or more programs are executed by the one or more processors, causing the one or more processors to implement the image color saturation enhancement method as described above.

[0010] In another aspect, embodiments of this disclosure also provide a computer-readable medium having a computer program stored thereon, wherein the program, when executed, implements the image color saturation enhancement method as described above.

[0011] The image color saturation enhancement method provided in this disclosure includes: for each pixel in a first image with a preset color format, calculating an enhancement coefficient for the pixel based on the value of a preset channel and a preset threshold; for each pixel, calculating the enhanced preset channel value based on the enhancement coefficient and the preset channel value; updating the preset channel value of the corresponding pixel in the first image based on the enhanced preset channel value of each pixel to enhance the color saturation of the first image, thereby obtaining a second image; wherein, when the preset channel value and the preset threshold of the pixel meet preset conditions, the color saturation of the pixel in the second image is equal to the color saturation of the pixel in the first image. This disclosure, by setting a threshold, avoids enhancing the color saturation of the image when the preset channel value and the preset threshold meet preset conditions, thus preventing oversaturation of the image color, and allows for flexible adjustment of the color enhancement range by adjusting the threshold. Attached Figure Description

[0012] Figure 1 Schematic flowchart of the image color saturation enhancement method provided in the embodiments of this disclosure Figure 1 ;

[0013] Figure 2 A flowchart illustrating the calculation of pixel enhancement coefficients provided in embodiments of this disclosure. Figure 1 ;

[0014] Figure 3 A flowchart illustrating the calculation of pixel enhancement coefficients provided in embodiments of this disclosure. Figure 2 ;

[0015] Figure 4a A schematic diagram of the specially enhanced region and other regions provided for embodiments of this disclosure;

[0016] Figure 4b A schematic diagram of the transition region and general enhancement region provided in the embodiments of this disclosure;

[0017] Figure 5 Schematic flowchart of the image color saturation enhancement method provided in the embodiments of this disclosure Figure 2 . Detailed Implementation

[0018] Exemplary embodiments will be described more fully below with reference to the accompanying drawings; however, these exemplary embodiments may be embodied in different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will enable those skilled in the art to fully understand the scope of this disclosure.

[0019] As used herein, the term “and / or” includes any and all combinations of one or more related enumerated entries.

[0020] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. As used herein, the singular forms “a” and “the” are also intended to include the plural forms unless the context clearly indicates otherwise. It will also be understood that when the terms “comprising” and / or “made of” are used in this specification, the presence of the said feature, integral, step, operation, element, and / or component is specified, but the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof is not excluded.

[0021] The embodiments described herein can be described with reference to plan views and / or cross-sectional views using the ideal schematic diagrams of this disclosure. Therefore, the example illustrations can be modified according to manufacturing techniques and / or tolerances. Therefore, the embodiments are not limited to those shown in the drawings, but include modifications to configurations formed based on manufacturing processes. Therefore, the areas illustrated in the drawings are schematic in nature, and the shapes of the areas shown in the figures illustrate specific shapes of areas of an element, but are not intended to be limiting.

[0022] Unless otherwise specified, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning, unless expressly so defined herein.

[0023] This disclosure provides an image color saturation enhancement method, such as... Figure 1 As shown, the image color saturation enhancement method includes the following steps:

[0024] Step S11: For each pixel in the first image with a preset color format, calculate the pixel enhancement coefficient based on the value of the preset channel and the preset threshold.

[0025] The color format mentioned in this disclosure refers to the encoding format of image colors, which includes, but is not limited to, YUV, RGB, and HSV color formats. In some embodiments, the preset color format is either HSV or YUV. In this disclosure, YUV color format is used as an example. The preset channels are related to the color format. For example, the preset channels of YUV color format include U and V channels, and the preset channels of HSV color format include S and V channels.

[0026] The first image is the image to be processed. In this step, the corresponding enhancement coefficient is calculated for each pixel in the image to be processed. However, color saturation enhancement processing is not performed on every pixel. For pixels whose preset channel values ​​and preset thresholds meet preset conditions, color saturation enhancement processing is not performed. That is, the enhancement coefficient of these pixels is equal to the preset value.

[0027] Step S12: For each pixel, calculate the value of the preset channel after pixel enhancement based on the pixel enhancement coefficient and the value of the preset channel.

[0028] In this step, the enhanced value of each preset channel for each pixel is calculated. For example, using the YUV color format, the enhanced U channel value Cb and V channel value Cr are calculated. For a given pixel, the enhanced U channel value Cb and V channel value Cr can be calculated using the following set of formulas (1):

[0029]

[0030] Where Cb is the enhanced U channel value, Cr is the enhanced V channel value, and en_f represents the pixel enhancement coefficient.

[0031] Step S13: Update the preset channel value of the corresponding pixel in the first image according to the value of the preset channel after each pixel is enhanced, so as to enhance the color saturation of the first image and obtain the second image; wherein, when the preset channel value and preset threshold of the pixel meet the preset conditions, the color saturation of the pixel in the second image is equal to the color saturation of the pixel in the first image.

[0032] In this embodiment of the disclosure, the enhancement coefficient of a pixel is greater than or equal to a preset value. Pixels with an enhancement coefficient greater than the preset value can achieve color saturation enhancement, while pixels with an enhancement coefficient equal to the preset value do not undergo color saturation enhancement.

[0033] The image color saturation enhancement method provided in this disclosure includes: for each pixel in a first image with a preset color format, calculating an enhancement coefficient for the pixel based on the value of a preset channel and a preset threshold; for each pixel, calculating the enhanced preset channel value based on the enhancement coefficient and the preset channel value; updating the preset channel value of the corresponding pixel in the first image based on the enhanced preset channel value of each pixel to enhance the color saturation of the first image, thereby obtaining a second image; wherein, when the preset channel value and the preset threshold of the pixel meet preset conditions, the color saturation of the pixel in the second image is equal to the color saturation of the pixel in the first image. This disclosure, by setting a threshold, avoids enhancing the color saturation of the image when the preset channel value and the preset threshold meet preset conditions, thus preventing image color oversaturation, and allows for flexible adjustment of the color enhancement range by adjusting the threshold.

[0034] In some embodiments, the preset threshold includes an upper threshold (up / mid), a lower threshold (low), and a maximum enhancement value (max_value). Figure 2 As shown, the step of calculating the enhancement coefficient of the pixel based on the value of the preset channel and the preset threshold (i.e., step S11) includes the following steps:

[0035] Step S21: Calculate the saturation of the pixel based on the value of the preset channel of the pixel.

[0036] The saturation of a pixel is calculated using the following formula (2):

[0037] squ=u*u+v*v (2)

[0038] Where squ is the pixel saturation, u is the value of the pixel's U channel, and v is the value of the pixel's V channel.

[0039] Step S22: Calculate the pixel enhancement coefficient based on the comparison results of pixel saturation with upper and lower threshold values.

[0040] In this step, the pixel saturation is compared with the upper and lower thresholds, and the pixel enhancement coefficient is calculated in different ways based on different comparison results.

[0041] When the saturation of a pixel is less than or equal to the lower threshold, the enhancement coefficient of the pixel is calculated based on the maximum enhancement value.

[0042] When the pixel saturation is greater than the lower threshold and less than the upper threshold, the pixel enhancement coefficient is calculated based on the maximum enhancement value, the upper threshold, the lower threshold, and the pixel saturation.

[0043] When the saturation of a pixel is greater than or equal to the upper limit threshold, the pixel enhancement coefficient is equal to a preset value. In other words, the preset conditions for the preset channel value and preset threshold of the pixel to satisfy the preset conditions include: the pixel saturation is greater than or equal to the upper limit threshold.

[0044] In this embodiment of the disclosure, the enhancement coefficient of the pixel is designed as a piecewise function. The piecewise function is used to adaptively enhance the color difference components of the image, which can significantly enhance areas with low color, slightly enhance areas with high color, and smoothly transition the remaining color areas, thereby improving the color saturation of the entire image.

[0045] In related technologies, nonlinear curves are typically used to enhance saturation, but these methods lack controllable parameters and are prone to causing image oversaturation. This disclosure sets a lower threshold (low) and an upper threshold (up). Pixels with saturation below the lower threshold (low) receive a larger enhancement coefficient, while pixels with saturation above the upper threshold (up) are not enhanced. The saturation enhancement coefficient between the thresholds low and up decreases sequentially to achieve adaptive saturation enhancement.

[0046] In some embodiments, such as Figure 3 As shown, the step of calculating the pixel enhancement coefficient based on the preset channel value and preset threshold (i.e., step S11) includes the following steps:

[0047] Step S31: Determine the region to which the pixel belongs in the first image. The preset thresholds corresponding to different regions in the first image are not exactly the same.

[0048] Step S32: Calculate the enhancement coefficient of the pixel based on the preset threshold corresponding to the region to which the pixel belongs in the first image and the value of the preset channel of the pixel.

[0049] like Figure 4a As shown, a rectangular coordinate system is established with the preset channel as the horizontal and vertical coordinates, and the first image to be processed is transformed into a UV rectangular coordinate map. The region includes a specially enhanced region 1 and other regions 2 besides the specially enhanced region 1.

[0050] The lower threshold corresponding to the specially enhanced region 1 is the first threshold (low), the upper threshold corresponding to the specially enhanced region 1 is the second threshold (up), and the maximum enhancement value corresponding to the specially enhanced region 1 is the third threshold (max_value). The lower threshold corresponding to other regions 2 is the first threshold (low), the upper threshold corresponding to other regions 2 is the fourth threshold (mid), and the maximum enhancement value corresponding to other regions 2 is the third threshold (max_value); wherein, the first threshold (low) is less than the fourth threshold (mid), and the fourth threshold (mid) is less than the second threshold (up).

[0051] The step of calculating the enhancement coefficient of a pixel based on a preset threshold corresponding to the region to which the pixel belongs in the first image and the value of the preset channel of the pixel (i.e., step S11) includes the following steps: when the pixel belongs to a special enhancement region 1 of the first image, a second enhancement coefficient f2 of the pixel is calculated based on a first threshold (low), a second threshold (up), a third threshold (max_value), and the value of the preset channel (u, v) of the pixel. The second enhancement coefficient f2 is the enhancement coefficient of the special enhancement region 1. When the pixel belongs to another region 2 of the first image, a first enhancement coefficient f1 of the pixel is calculated based on a first threshold (low), a fourth threshold (mid), a third threshold (max_value), and the value of the preset channel (u, v) of the pixel. The first enhancement coefficient f1 is the enhancement coefficient of the other region 2.

[0052] The second enhancement coefficient f2 of the pixel can be calculated according to the following formula (3):

[0053]

[0054] The second enhancement coefficient f1 of the pixel can be calculated according to the following formula (4):

[0055]

[0056] like Figure 4a As shown, the specially enhanced region 1 is the region corresponding to the second quadrant in a Cartesian coordinate system established with preset channels as the horizontal and vertical coordinates. Related technologies for enhancing image color saturation use the same function curve for color saturation enhancement. However, when enhancing the color saturation of a person's image, the skin tone is not prominent, resulting in poor image display. To solve this problem, this embodiment divides the entire image to be processed into multiple regions and sets a larger upper threshold for the region containing the person's skin, thus significantly enhancing the color saturation of the skin region. For a person's image, the skin is mainly concentrated in the second quadrant. Therefore, this embodiment sets a larger second threshold (up) for the specially enhanced region 1 corresponding to the second quadrant, and a smaller second threshold (mid) for other regions 2 corresponding to the other quadrants, thereby significantly enhancing the color saturation of the skin tone region and improving the color contrast between the person and other objects.

[0057] Because the color saturation enhancement levels of the specially enhanced region 1 and other regions 2 differ, color jumps are prone to occur in areas adjacent to the specially enhanced region 1. To address this issue, this embodiment further divides the other regions 2 into transition regions. A LUT (Look-Up Table) is used to combine the enhancement coefficients of the specially enhanced region 1 and other regions 2 to calculate the enhancement coefficient of the transition region 21, thus resolving the color jump problem in the transition region 21.

[0058] like Figure 4b As shown, other regions 2 include a general enhancement region 22 and a transition region 21, with the transition region 21 adjacent to the special enhancement region 1. In some embodiments, the transition region 21 is the region adjacent to the special enhancement region 1 in the first and third quadrants of a Cartesian coordinate system. In embodiments of this disclosure, as... Figure 4b As shown, the transition region 21 includes the region formed by the function curve of v = u in the first quadrant and the v-axis (vertical axis), and the region formed by the function curve of v = u in the third quadrant and the u-axis (horizontal axis).

[0059] The lower threshold corresponding to the general enhancement region 22 is the first threshold (low), the upper threshold corresponding to the general enhancement region 22 is the fourth threshold (mid), and the maximum enhancement value corresponding to the general enhancement region 22 is the third threshold (max_value).

[0060] Determining the region to which a pixel belongs in the first image (i.e., step S31) includes: determining the region to which the pixel belongs in the first image based on the value of a preset channel of the pixel.

[0061] The criteria for determining the special enhancement region 1 are: U≤0 and V≥0;

[0062] The conditions for determining the transition region 21 are: U>0 and V>U, or V<0 and U>U. <V;

[0063] The general criteria for determining enhanced region 22 are: U>0 and V<0, or U>0 and V>0 and U≥V, or U<0 and V<0 and U≥V.

[0064] When other regions 2 include general enhancement region 22 and transition region 21, the step of calculating the enhancement coefficient of the pixel based on the preset threshold corresponding to the region to which the pixel belongs in the first image and the preset channel value of the pixel (i.e., step S32) includes the following steps: When the pixel belongs to the general enhancement region 22 of the first image, the enhancement coefficient of the pixel is the first enhancement coefficient f1. That is, the first enhancement coefficient f1 of the pixel is calculated based on the first threshold (low), the fourth threshold (mid), the third threshold (max_value), and the preset channel value (u, v) of the pixel. When the pixel belongs to the transition region 21 of the first image, the third enhancement coefficient f3 of the pixel is determined based on the preset channel value (u, v), the enhancement coefficient of the special enhancement region, the enhancement coefficient of other regions, and the preset display lookup table. That is, the enhancement coefficient of the pixel in the general enhancement region 22 is equal to the first enhancement coefficient f1 of other regions 2, and the first enhancement coefficient f1 can be calculated using the above formula (4). The third enhancement coefficient f3 of the pixel in the transition region 21 is calculated by looking up the LUT table and combining the second enhancement coefficient f2 of the pixel in the special enhancement region 1 with the first enhancement coefficient f1 of other regions 2. It should be noted that the first enhancement coefficient f1 can be calculated using formula (4) based on the comparison results of the pixel's saturation (squ) with the first threshold (low) and the fourth threshold (mid); the second enhancement coefficient f2 can be calculated using formula (3) based on the comparison results of the pixel's saturation (squ) with the first threshold (low) and the second threshold (up).

[0065] Based on the preset channel value of the pixel, the first enhancement coefficient f1 and the second enhancement coefficient f2, the third enhancement coefficient of the pixel in the transition region 21 is calculated using a LUT table of length 512. This can solve the problem of color jump in the image and make the overall color of the image transition smoothly.

[0066] A LUT table is a one-dimensional lookup table that can find the corresponding value (i.e., color parameter value) in the table based on the input lookup number (i.e., index) and output it. The LUT table is as follows: LUT = [1024, 905, 803, ..., 11, 11, 11].

[0067] In some embodiments, determining the third enhancement coefficient f3 of a pixel based on the value of a preset channel of the pixel, the enhancement coefficient f2 of a specially enhanced region, the enhancement coefficient f1 of other regions, and a preset display lookup table includes the following steps:

[0068] Step S41: Calculate the query number based on the preset channel value of the pixel.

[0069] like Figure 4bAs shown, the transition region 21 includes two parts: the part located in the first quadrant of the UV rectangular coordinate system and the part located in the third quadrant of the UV rectangular coordinate system. Different calculation methods are used for the transition regions 21 located in different quadrants.

[0070] In calculating the third enhancement coefficient f3 of the pixels in the transition region 21 of the first quadrant, the query number Index1 is calculated according to the following formula (5):

[0071] Index1 = int(4*v / u-4) (5)

[0072] Where int represents rounding down, u is the value of the U channel of the pixel, and v is the value of the V channel of the pixel.

[0073] In calculating the third enhancement coefficient f3 of the pixels in the transition region 21 of the third quadrant, the query number Index2 is calculated according to the following formula (6):

[0074] Index2=int(4*abs(u) / abs(v)-4) (6)

[0075] Where int represents rounding down, abs represents taking the absolute value, u is the value of the U channel of the pixel, and v is the value of the V channel of the pixel.

[0076] Since the length of the LUT table is 512, if the values ​​of Index1 and Index2 calculated according to formula (5) and formula (6) are greater than 511, then the values ​​of Index1 and Index2 are 511.

[0077] Step S42: Use the query number as an index to search the preset display lookup table to obtain the color parameter value of the pixel, and calculate the third enhancement coefficient of the pixel based on the color parameter value of the pixel, the second enhancement coefficient f2 of the pixel and the first enhancement coefficient f1 of the pixel.

[0078] The color parameter value of a pixel is either LUT[Index1] or LUT[Index2].

[0079] The third enhancement coefficient f3 of the pixels in the transition region 21 of the first quadrant can be calculated according to the following formula (7):

[0080] f3=f2*1024-f2*LUT[Index1]+f1*LUT[Index1] (7)

[0081] The third enhancement coefficient f3 of the pixels in the transition region 21 of the third quadrant can be calculated according to the following formula (8):

[0082] f3=f2*1024-f2*LUT[Index2]+f1*LUT[Index2] (8)

[0083] Where f1 is the first enhancement coefficient of the pixel, which is the enhancement coefficient of the special enhancement area corresponding to the uv value of the pixel, and f2 is the second enhancement coefficient of the pixel, which is the enhancement coefficient of other areas corresponding to the uv value of the pixel.

[0084] It should be noted that if the color format of the image to be processed is not the preset color format, it must be converted to the preset color format before performing image color saturation enhancement processing. Therefore, as... Figure 5 As shown, before calculating the pixel enhancement coefficient (i.e., step S11) for each pixel in the first image with a preset color format based on the pixel's preset channel value and preset threshold, the image color saturation enhancement method further includes the following steps:

[0085] Step S10: Convert the third image (which is not in the preset color format) into the first image (which is in the preset color format).

[0086] Taking the third image in RGB format as an example, it can be converted into a first image in YUV format using the following set of formulas (9):

[0087] y=(54*r+183*g+18*b+128)>>8

[0088] u=((-29*r-99*g+128*b+128)>>8)+128

[0089] v=((128*r-116*g-12*b+128)>>8)+128 (9)

[0090] Where r, g, b represent the values ​​of the R, G, and B channels of a pixel, y, u, v represent the values ​​of the Y, U, and V channels of a pixel, and >> indicates rounding down.

[0091] Accordingly, after updating the preset channel values ​​of the corresponding pixels in the first image according to the enhanced preset channel values ​​of each pixel to enhance the color saturation of the first image and obtain the second image (i.e., step S13), the image color saturation enhancement method further includes the following steps:

[0092] Step S14: Convert the second image into a fourth image in the target color format, where the target color format is the color format of the third image.

[0093] The first image in YUV format can be converted into a fourth image in RGB format using the following set of formulas (10):

[0094] r=(256*y+403*(v-128)+128)>>8

[0095] g=(256*y-48*(u-128)-416*(v-128)+128)>>8

[0096] b=(256*y+475*(u-128)+128)>>8 (10)

[0097] Where r, g, b represent the values ​​of the R, G, and B channels of a pixel, y, u, v represent the values ​​of the Y, U, and V channels of a pixel, and >> indicates rounding down.

[0098] It should be noted that after step S11 is executed and before step S13 is executed, step S12 must be executed. The specific implementation process of step S12 is as described above and will not be repeated here.

[0099] The image color saturation enhancement method of this disclosure aims to adaptively enhance the color saturation of an input image, especially significantly enhancing skin tones to improve visual quality. This disclosure primarily operates in the YUV domain, using piecewise function curves to adaptively enhance color difference components, thereby improving the overall color saturation of the image.

[0100] This embodiment effectively solves the image oversaturation problem by setting a threshold value; if the value exceeds the threshold, color saturation is not enhanced. The threshold value is user-adjustable, allowing for more flexible enhancement of the video image. By setting a larger upper threshold (up) for the second quadrant and a smaller upper threshold (mid) for the other quadrants, the color saturation of skin tones is significantly enhanced, highlighting the skin color. The enhancement coefficient for transition regions is calculated using a lookup LUT table method to address color jumps in transition areas, resulting in a smooth overall color transition. Processing the image pixel-by-pixel in the YUV domain requires far fewer computational resources than deep learning solutions, making it easier to implement in hardware.

[0101] This disclosure also provides a computer device, which includes one or more processors and a storage device; wherein the storage device stores one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement the image color saturation enhancement method provided in the foregoing embodiments.

[0102] This disclosure also provides a computer-readable medium having a computer program stored thereon, wherein the computer program, when executed, implements the image color saturation enhancement method provided in the foregoing embodiments.

[0103] It will be understood by those skilled in the art that all or some of the steps in the methods disclosed above, and the functional modules / units in the apparatus, can be implemented as software, firmware, hardware, and suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0104] Example embodiments have been disclosed herein, and while specific terminology has been used, it is for illustrative purposes only and should be construed as such, and is not intended to be limiting. In some instances, it will be apparent to those skilled in the art that features, characteristics, and / or elements described in conjunction with particular embodiments may be used alone, or in combination with features, characteristics, and / or elements described in conjunction with other embodiments, unless otherwise expressly indicated. Therefore, those skilled in the art will understand that various changes in form and detail may be made without departing from the scope of the invention as set forth in the appended claims.

Claims

1. A method for enhancing image color saturation, characterized in that, include: For each pixel in a first image with a preset color format, the enhancement coefficient of the pixel is calculated based on the value of the preset channel and a preset threshold. For each pixel, the enhanced value of the preset channel is calculated based on the pixel's enhancement coefficient and the value of the preset channel. The preset channel value of the corresponding pixel in the first image is updated according to the preset channel value of each pixel after enhancement, so as to enhance the color saturation of the first image and obtain the second image; wherein, when the preset channel value of the pixel and the preset threshold meet the preset conditions, the color saturation of the pixel in the second image is equal to the color saturation of the pixel in the first image; The preset threshold includes an upper threshold, a lower threshold, and a maximum enhancement value. The calculation of the enhancement coefficient of the pixel based on the preset channel value and the preset threshold includes: The saturation of the pixel is calculated based on the value of the preset channel of the pixel; The enhancement coefficient of the pixel is calculated based on the comparison results between the saturation of the pixel and the upper and lower thresholds. Wherein, when the saturation of the pixel is less than or equal to the lower threshold, the enhancement coefficient of the pixel is calculated based on the maximum enhancement value; When the saturation of a pixel is greater than the lower threshold and less than the upper threshold, the enhancement coefficient of the pixel is calculated based on the maximum enhancement value, the upper threshold, the lower threshold, and the saturation of the pixel. The preset conditions for the value of the preset channel of the pixel and the preset threshold to satisfy the preset conditions include: the saturation of the pixel is greater than or equal to the upper limit threshold.

2. The method as described in claim 1, characterized in that, The step of calculating the enhancement coefficient of the pixel based on the value of the preset channel and the preset threshold includes: Determine the region to which the pixel belongs in the first image, where the preset thresholds for different regions in the first image are not entirely the same; The enhancement coefficient of the pixel is calculated based on the preset threshold corresponding to the region to which the pixel belongs in the first image and the value of the preset channel of the pixel.

3. The method as described in claim 2, characterized in that, The region includes a specially enhanced region and other regions besides the specially enhanced region. The lower threshold corresponding to the specially enhanced region is a first threshold, the upper threshold corresponding to the specially enhanced region is a second threshold, and the maximum enhancement value corresponding to the specially enhanced region is a third threshold. The lower threshold corresponding to the other regions is the first threshold, the upper threshold corresponding to the other regions is a fourth threshold, and the maximum enhancement value corresponding to the other regions is the third threshold. The first threshold is less than the fourth threshold, and the fourth threshold is less than the second threshold; The step of calculating the enhancement coefficient of the pixel based on a preset threshold corresponding to the region to which the pixel belongs in the first image and the value of a preset channel of the pixel includes: If the pixel belongs to a special enhancement region of the first image, a second enhancement coefficient of the pixel is calculated based on the first threshold, the second threshold, the third threshold and the value of the preset channel of the pixel. The second enhancement coefficient is the enhancement coefficient of the special enhancement region. If the pixel belongs to another region of the first image, a first enhancement coefficient of the pixel is calculated based on the first threshold, the fourth threshold, the third threshold, and the value of the preset channel of the pixel. The first enhancement coefficient is the enhancement coefficient of the other region.

4. The method as described in claim 3, characterized in that, The specially enhanced region is the region corresponding to the second quadrant in a Cartesian coordinate system established with the preset channel as the horizontal and vertical coordinates.

5. The method as described in claim 4, characterized in that, The other regions include general enhancement regions and transition regions, with the transition regions adjacent to the special enhancement regions; the lower threshold corresponding to the general enhancement region is the first threshold, the upper threshold corresponding to the general enhancement region is the fourth threshold, and the maximum enhancement value corresponding to the general enhancement region is the third threshold; The step of calculating the enhancement coefficient of the pixel based on a preset threshold corresponding to the region to which the pixel belongs in the first image and the value of a preset channel of the pixel includes: When the pixel belongs to the general enhancement region of the first image, the enhancement coefficient of the pixel is the first enhancement coefficient; When the pixel belongs to the transition region of the first image, a third enhancement coefficient of the pixel is determined based on the value of the preset channel of the pixel, the enhancement coefficient of the special enhancement region, the enhancement coefficient of the other regions, and a preset display lookup table.

6. The method as described in claim 5, characterized in that, The step of determining the third enhancement coefficient of the pixel based on the value of the preset channel of the pixel, the enhancement coefficient of the special enhancement region, the enhancement coefficient of the other regions, and a preset display lookup table includes: Calculate the query number based on the preset channel value of the pixel; The color parameter value of the pixel is obtained by searching the preset display lookup table using the query number as an index, and the third enhancement coefficient of the pixel is calculated based on the color parameter value of the pixel, the enhancement coefficient of the special enhancement region, and the enhancement coefficient of the other regions.

7. The method as described in claim 5, characterized in that, The transition region is the area in the first and third quadrants of the rectangular coordinate system adjacent to the specially enhanced region.

8. The method according to any one of claims 1-7, characterized in that, Before calculating the enhancement coefficient of each pixel in a first image with a preset color format based on the value of a preset channel and a preset threshold, the method further includes: converting a third image that is not in the preset color format into the first image with the preset color format; After updating the preset channel values ​​of corresponding pixels in the first image according to the enhanced preset channel values ​​of each pixel to enhance the color saturation of the first image and obtain the second image, the method further includes: The second image is converted into a fourth image in a target color format, wherein the target color format is the color format of the third image.

9. The method as described in claim 8, characterized in that, The preset color format is either HSV or YUV.

10. A computer device, wherein, include: One or more processors; A storage device on which one or more programs are stored; When the one or more programs are executed by the one or more processors, the one or more processors implement the image color saturation enhancement method as described in any one of claims 1-9.

11. A computer-readable medium having a computer program stored thereon, wherein, When the program is executed, it implements the image color saturation enhancement method as described in any one of claims 1-9.

Citation Information

Patent Citations

  • Image processing method and device, electronic equipment and storage medium

    CN110136071A

  • Gamut conversion system and methods

    CN1867963A