Image color saturation enhancement method, computer device, and readable medium

By calculating enhancement coefficients for each pixel and using piecewise functions and LUT tables, adaptive enhancement of image color saturation is achieved, avoiding image oversaturation, improving visual effects, solving color jump problems, and providing flexible Enhanced range adjustment.

WO2024198680A1PCT designated stage expired Publication Date: 2024-10-03SANECHIPS TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/073835
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-30
Filing Date
2024-01-24
Publication Date
2024-10-03

AI Technical Summary

Technical Problem

When the existing technology enhances the color saturation of an image, it is easy to cause the image to be oversaturated, and the enhancement range cannot be adjusted, affecting the visual effect.

Method used

By calculating the enhancement coefficient for each pixel, updating the channel value of the pixel according to the preset channel value and threshold, designing segmentation functions and LUT tables to adaptively enhance color, avoid oversaturation and flexibly adjust the enhancement range.

Benefits of technology

It effectively avoids image oversaturation and improves the overall effect of image color saturation, especially in the skin color area of ​​characters, which solves the problem of color jump and smoothes the transition of image colors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024073835_03102024_PF_FP_ABST
    Figure CN2024073835_03102024_PF_FP_ABST
Patent Text Reader

Abstract

The present disclosure provides an image color saturation enhancement method, comprising: for each pixel in a first image in a preset color format, calculating an enhancement coefficient of the pixel according to the value of a preset channel of the pixel and a preset threshold; according to the enhancement coefficient of the pixel and the value of the preset channel, calculating the value of the preset channel of the pixel after being enhanced; and according to the value of the preset channel of each pixel after being enhanced, updating the value of the preset channel of the corresponding pixel in the first image, so as to enhance the color saturation of the first image to obtain a second image, wherein under the condition that the value of the preset channel of the pixel and the preset threshold meet 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. The present disclosure further provides a computer device and a computer readable storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

Image color saturation enhancement method, computer device and readable medium

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to Chinese patent application No. 202310365940.X filed on March 30, 2023, the contents of which are incorporated herein by reference in their entirety. Technical Field

[0003] The present disclosure relates to the field of image processing technology, and in particular to an image color saturation enhancement method, a computer device, and a computer-readable storage medium. Background Art

[0004] With the development of display technology, users have higher and higher requirements for display image quality. Highly saturated images can give people a better visual experience, while video images with dim colors and low saturation affect people's perception.

[0005] The current solutions for enhancing the color saturation of an image in related technologies easily cause the image to be oversaturated, and the enhanced range of the image color saturation cannot be adjusted.

[0006] Public content

[0007] On the one hand, an embodiment of the present disclosure provides an image color saturation enhancement method, comprising: for each pixel in a first image of a preset color format, calculating an enhancement coefficient of the pixel according to the value of a preset channel of the pixel and a preset threshold; for each pixel, calculating the value of the preset channel after the pixel is enhanced according to the enhancement coefficient of the pixel and the value of the preset channel; updating the value of the preset channel of the corresponding pixel in the first image according to the value of the preset channel after the pixel is enhanced, so as to enhance the color saturation of the first image and obtain a second image; when the value of the preset channel of the pixel and the preset threshold 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.

[0008] On the other hand, an embodiment of the present disclosure also provides a computer device, comprising: at least one processor; a storage device on which at least one computer program is stored; when the at least one computer program is executed by the at least one processor, the at least one processor implements the image color saturation enhancement method as described above.

[0009] On the other hand, an embodiment of the present disclosure further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the processor implements the image color saturation enhancement method as described above. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] FIG1 is a schematic diagram of a method for enhancing image color saturation according to an embodiment of the present disclosure;

[0011] FIG2 is a schematic diagram of a process for calculating pixel enhancement coefficients according to an embodiment of the present disclosure;

[0012] FIG3 is a schematic diagram of a process for calculating pixel enhancement coefficients according to an embodiment of the present disclosure;

[0013] FIG4 a is a schematic diagram of a special enhancement area and other areas provided by an embodiment of the present disclosure;

[0014] FIG4 b is a schematic diagram of a transition region and a general enhancement region provided by an embodiment of the present disclosure;

[0015] FIG5 is a flow chart of a method for enhancing image color saturation provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0016] Hereinafter, some example embodiments will be described more fully with reference to the accompanying drawings, but the example embodiments may be embodied in different forms, and the present disclosure should not be construed as limited to the embodiments set forth herein. These embodiments are provided to make the present disclosure more thorough and complete and to enable those skilled in the art to fully understand the scope of the present disclosure.

[0017] As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.

[0018] The terms used herein are used only to describe specific embodiments and do not limit the present disclosure. As used herein, the singular forms "a", "an" and "the" also 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, it specifies the presence of the features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof.

[0019] The embodiments described herein may be described with reference to plan views and / or cross-sectional views, with the aid of idealized schematic diagrams of the present disclosure. Therefore, the example illustrations may be modified based on manufacturing techniques and / or tolerances. Therefore, the embodiments are not limited to the embodiments shown in the accompanying drawings, but include modifications of the configurations formed based on the manufacturing process. Therefore, the regions illustrated in the accompanying drawings are schematic in nature, and the shapes of the regions shown in the drawings illustrate specific shapes of the regions of the components, but are not limiting.

[0020] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those skilled 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 the present disclosure, and will not be interpreted as having an idealized or overly formal meaning unless expressly defined as such herein.

[0021] An embodiment of the present disclosure provides a method for enhancing the color saturation of an image. As shown in FIG1 , the method for enhancing the color saturation of an image includes the following steps S11 to S13 .

[0022] Step S11 : for each pixel in the first image of the preset color format, calculating an enhancement coefficient of the pixel according to a value of a preset channel of the pixel and a preset threshold.

[0023] The color format referred to in the embodiments of the present disclosure refers to the encoding format of the image color, and the encoding format of the image color includes but is not limited to the YUV color format, RGB color format, HSV color format, etc. In some embodiments, the preset color format is the HSV color format or the YUV color format. In the embodiments of the present disclosure, the YUV color format is used as an example for explanation. The preset channels are related to the color format. For example, the preset channels of the YUV color format include the U channel and the V channel, and the preset channels of the HSV color format include the S channel and the V channel.

[0024] 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 one by one. Color saturation enhancement processing is not performed on every pixel. For pixels whose values ​​of the preset channels and preset thresholds meet the preset conditions, color saturation enhancement processing is not performed, that is, the enhancement coefficients of these pixels are equal to the preset values.

[0025] Step S12: For each pixel, the value of the preset channel after pixel enhancement is calculated according to the enhancement coefficient of the pixel and the value of the preset channel.

[0026] In this step, the enhanced value of each preset channel of each pixel is calculated separately. For example, taking the YUV color format as an example, the enhanced U channel value Cb and V channel value Cr of the pixel are calculated. For a certain pixel, the enhanced U channel value Cb and V channel value Cr can be calculated according to the following set of formulas (1):

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

[0028] Step S13, updating the value of the preset channel 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 a second image; when the value of the preset channel 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.

[0029] In the embodiment of the present disclosure, the enhancement coefficient of the pixel may be greater than or equal to a preset value. For pixels with an enhancement coefficient greater than the preset value, color saturation enhancement can be achieved; for pixels with an enhancement coefficient equal to the preset value, color saturation enhancement is not performed.

[0030] The image color saturation enhancement method provided by the embodiment of the present disclosure includes: for each pixel in a first image of a preset color format, calculating the pixel enhancement coefficient based on the value of the preset channel of the pixel and a preset threshold; for each pixel, calculating the value of the preset channel after the pixel enhancement based on the pixel enhancement coefficient and the value of the preset channel; updating the value of the preset channel of the corresponding pixel in the first image based on the value of the preset channel after each pixel enhancement, so as to enhance the color saturation of the first image and obtain a second image; when the value of the preset channel 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. By setting a preset threshold, the embodiment of the present disclosure does not enhance the color saturation of the image when the value of the preset channel of the pixel and the preset threshold meet the preset conditions, thereby avoiding oversaturation of the image color, and the range of color enhancement can be flexibly adjusted by adjusting the preset threshold.

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

[0032] Step S21 : calculating the saturation of the pixel according to the value of the preset channel of the pixel.

[0033] The saturation of a pixel is calculated according to the following formula (2): squ=u*u+v*v (2)

[0034] squ is the saturation of the pixel, u is the value of the U channel of the pixel, and v is the value of the V channel of the pixel.

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

[0036] In this step, the saturation of the pixel is compared with the upper threshold and the lower threshold respectively, and according to different comparison results, the enhancement coefficient of the pixel is calculated in different ways.

[0037] When the saturation of a pixel is less than or equal to a lower threshold, an enhancement coefficient for the pixel is calculated based on the maximum enhancement value. When the saturation of a pixel is greater than the lower threshold but less than the upper threshold, an enhancement coefficient for the pixel is calculated based on the maximum enhancement value, the upper threshold, the lower threshold, and the saturation of the pixel. When the saturation of the pixel is greater than or equal to the upper threshold, the enhancement coefficient for the pixel is equal to a preset value. In other words, the value of the preset channel and the preset threshold of the pixel satisfying the preset condition includes: the saturation of the pixel being greater than or equal to the upper threshold.

[0038] In the embodiment of the present disclosure, the pixel enhancement coefficient is designed as a piecewise function, and the piecewise function is used to realize adaptive enhancement of the color difference component of the image. It is possible to greatly enhance the areas with low color, slightly enhance the areas with high color, and smoothly transition the remaining color areas, thereby improving the color saturation of the entire image.

[0039] In related technologies, nonlinear curves are often used to enhance pixel saturation, but this lacks controllable parameters and can easily lead to oversaturation of image colors. The disclosed embodiment sets a lower threshold (low) and an upper threshold (up). Pixel saturations below the lower threshold (low) receive a larger enhancement factor, while those above the upper threshold (up) are not enhanced. The saturation enhancement factors between the thresholds (low) and (up) decrease in order to achieve adaptive saturation enhancement.

[0040] In some embodiments, as shown in FIG3 , the step of calculating the enhancement coefficient of a pixel according to the value of a preset channel of the pixel and a preset threshold (ie, step S11 ) includes the following steps: S31 and S32 .

[0041] Step S31 : determining the region to which the pixel belongs in the first image, wherein the preset thresholds corresponding to different regions in the first image are not completely the same.

[0042] Step S32 , calculating an enhancement coefficient of the pixel according to 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.

[0043] As shown in FIG4a , a rectangular coordinate system is established with preset channels as horizontal and vertical coordinates, and the first image to be processed is converted into a UV rectangular coordinate diagram, wherein the region includes a special enhancement region 1 and other regions 2 except the special enhancement region 1 .

[0044] 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 the other regions 2 is the first threshold (low), the upper threshold corresponding to the other regions 2 is the fourth threshold (mid), and the maximum enhancement value corresponding to the other regions 2 is the third threshold (max_value); the first threshold (low) is less than the fourth threshold (mid), and the fourth threshold (mid) is less than the second threshold (up).

[0045] The method of calculating the enhancement coefficient of a pixel based on the preset threshold corresponding to the area to which the pixel belongs in the first image and the value of the preset channel of the pixel (i.e., step S32) includes the following steps: when the pixel belongs to the specially enhanced area 1 of the first image, the second enhancement coefficient f2 of the pixel is calculated based on the first threshold (low), the second threshold (up), the third threshold (max_value) and the value (u, v) of the preset channel of the pixel, and the second enhancement coefficient f2 is the enhancement coefficient of the specially enhanced area 1; when the pixel belongs to other areas 2 of the first image, 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 value (u, v) of the preset channel of the pixel, and the first enhancement coefficient f1 is the enhancement coefficient of other areas 2.

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

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

[0048] As shown in Figure 4a, the special enhancement area 1 is the area corresponding to the second quadrant in the rectangular coordinate system established with the preset channel as the horizontal and vertical coordinates. The solution for enhancing the color saturation of the image in the related art uses the same function curve to enhance the color saturation. When the color saturation of the character image is enhanced, the skin color of the character is not prominent and the character display effect is not good. The embodiment of the present disclosure divides the entire image to be processed into multiple areas, and sets a larger upper limit threshold for the area where the character's skin is located, and significantly enhances the color saturation of the skin area. For character images, the skin is mainly concentrated in the second quadrant. Therefore, the embodiment of the present disclosure sets a larger second threshold (up) for the special enhancement area 1 corresponding to the second quadrant, and sets a smaller fourth threshold (mid) for the other areas 2 corresponding to the other quadrants, so as to significantly enhance the color saturation of the character's skin area, thereby improving the color contrast between the character and other objects.

[0049] Because the color saturation enhancement amplitudes of the specially enhanced region 1 and the other regions 2 differ, color jumps are prone to occur in the area adjacent to the specially enhanced region 1. This disclosed embodiment further divides the other regions 2 into a transition region 21. A look-up table (LUT) is used to combine the enhancement coefficients of the specially enhanced region 1 with those of the other regions 2 to calculate the enhancement coefficient for the transition region 21, thus resolving the color jump issue in the transition region 21.

[0050] As shown in FIG4b , the other regions 2 include a general enhancement region 22 and a transition region 21, with the transition region 21 being 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 rectangular coordinate system. In the disclosed embodiment, as shown in FIG4b , the transition region 21 includes the region formed by the v=u function curve in the first quadrant and the v-axis (vertical axis), and the region formed by the v=u function curve in the third quadrant and the u-axis (horizontal axis).

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

[0052] The determining of the region to which the pixel belongs in the first image (ie, step S31 ) includes: determining the region to which the pixel belongs in the first image according to the value of a preset channel of the pixel.

[0053] The judgment conditions for the special enhancement area 1 are: U≤0 and V≥0;

[0054] The determination conditions of the transition region 21 are: U>0 and V>U, or, V<0 and U <V;

[0055] Generally, the conditions for determining the enhancement 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.

[0056] In the case where the other regions 2 include the general enhancement region 22 and the transition region 21, the step of calculating the enhancement coefficient of the pixel (i.e., step S32) 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 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 value (u, v) of the preset channel 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 value (u, v) of the preset channel of the pixel, the enhancement coefficient of the special enhancement region 1, the enhancement coefficient of the other regions 2, 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 the 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 querying the LUT table and combining the second enhancement coefficient f2 of the pixel in the special enhancement region 1 and the first enhancement coefficient f1 of the other regions 2. It should be noted that the first enhancement coefficient f1 can be calculated using formula (4) based on the comparison result of the saturation (squ) of the pixel 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 result of the saturation (squ) of the pixel with the first threshold (low) and the second threshold (up).

[0057] According to the value of the preset channel of the pixel, the first enhancement coefficient f1 and the second enhancement coefficient f2, the third enhancement coefficient f3 of the pixel in the transition area 21 is calculated using a LUT table with a length of 512, which can solve the problem of image color jump and make the overall color of the image transition smoothly.

[0058] The LUT is a one-dimensional lookup table that finds the corresponding value (i.e., color parameter value) in the table based on the query sequence number (i.e., subscript) entered. The LUT table is as follows: LUT = [1024,905,803,...,11,11,11].

[0059] In some embodiments, determining the third enhancement coefficient f3 of the pixel according to the value of the preset channel of the pixel, the enhancement coefficient f2 of the special enhancement area, the enhancement coefficient f1 of other areas and a preset display lookup table includes the following steps: S41 and S42.

[0060] Step S41: Calculate the query sequence number according to the value of the preset channel of the pixel.

[0061] As shown in FIG4 b , the transition region 21 includes two parts, namely, a part located in the first quadrant of the UV rectangular coordinate system and a 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.

[0062] In the process of calculating the third enhancement coefficient f3 of the pixels in the transition area 21 of the first quadrant, the query index Index1 is calculated according to the following formula (5): Index1 = int(4*v / u-4) (5)

[0063] int means 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.

[0064] In the process of calculating the third enhancement coefficient f3 of the pixels in the transition area 21 of the third quadrant, the query index Index2 is calculated according to the following formula (6): Index2 = int(4*abs(u) / abs(v)-4) (6)

[0065] int means rounding down, abs means 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.

[0066] 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, the values ​​of Index1 and Index2 are 511.

[0067] In step S42, a preset display lookup table is searched using the query number as an index to obtain the color parameter value of the pixel, and a third enhancement coefficient f3 of the pixel is calculated based on the color parameter value of the pixel, the second enhancement coefficient f2 of the pixel (the enhancement coefficient of the special enhancement area 1), and the first enhancement coefficient f1 of the pixel (the enhancement coefficient of the other area 2).

[0068] The color parameter value of the pixel is LUT[Index1] or LUT[Index2].

[0069] The third enhancement coefficient f3 of the pixels in the transition area 21 of the first quadrant can be calculated according to the following formula (7): f3 = f2*1024-f2*LUT[Index1]+f1*LUT[Index1] (7)

[0070] The third enhancement coefficient f3 of the pixels in the transition area 21 of the third quadrant can be calculated according to the following formula (8): f3 = f2*1024-f2*LUT[Index2]+f1*LUT[Index2] (8)

[0071] f1 is the first enhancement coefficient of the pixel, which is the enhancement coefficient of the other area 2 corresponding to the value (u, v) of the preset channel of the pixel. f2 is the second enhancement coefficient of the pixel, which is the enhancement coefficient of the special enhancement area 1 corresponding to the value (u, v) of the preset channel of the pixel.

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

[0073] Step S10 : converting the third image in a non-preset color format into the first image in a preset color format.

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

[0075] r, g, and b represent the values ​​of the R, G, and B channels of the pixel respectively. y, u, and v represent the values ​​of the Y, U, and V channels of the pixel respectively. >> means rounding down.

[0076] Correspondingly, after updating the value of the preset channel of the corresponding pixel in the first image according to the value of the preset channel after each pixel is enhanced to enhance the color saturation of the first image and obtain the second image (i.e., step S13), the image color saturation enhancement method also includes the following steps: S14.

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

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

[0079] r, g, and b represent the values ​​of the R, G, and B channels of the pixel respectively. y, u, and v represent the values ​​of the Y, U, and V channels of the pixel respectively. >> means rounding down.

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

[0081] The image color saturation enhancement method of the disclosed embodiment can adaptively enhance the color saturation of an input image, particularly significantly enhancing the skin tone of a person to improve the perceived quality. This disclosed embodiment is primarily implemented in the YUV domain, adaptively enhancing the color difference component by designing a piecewise function curve to improve the color saturation of the entire image.

[0082] The disclosed embodiment sets a threshold value, and does not enhance the color saturation when the color is greater than the preset threshold value, thereby effectively solving the problem of image oversaturation. The threshold value can be set so that the user can adjust the color enhancement range parameters, and the video image enhancement range is more flexible. By setting a larger upper limit threshold value (up) for the second quadrant area and a lower upper limit threshold value (mid) for the other quadrant areas, the color saturation of the character's skin color area is greatly enhanced, thereby highlighting the character's skin color. The LUT table query method is used to calculate the enhancement coefficient of the transition area to solve the problem of color jumps in the transition area and make the overall color of the image smoothly transition. The image is processed pixel by pixel in the YUV domain, and the computing resources required are far less than those of the deep learning solution, which is convenient for implementation on hardware.

[0083] An embodiment of the present disclosure also provides a computer device, comprising: at least one processor and a storage device; at least one computer program is stored on the storage device, and when the at least one computer program is executed by the at least one processor, the at least one processor implements the image color saturation enhancement method as described above.

[0084] An embodiment of the present disclosure further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the processor implements the aforementioned method for enhancing the color saturation of an image.

[0085] It will be appreciated by those skilled in the art that all or some of the steps in the method disclosed above, and the functional modules / units in the device can be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware implementation, the division between the 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 by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As is well known to those skilled in the art, the term computer storage medium 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 technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media generally embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0086] Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for purposes of limitation. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly stated, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, it will be understood by those skilled in the art that various changes in form and detail may be made without departing from the scope of the present disclosure as set forth in the appended claims.

Claims

1. A method for enhancing image color saturation, comprising: For each pixel in the first image of a preset color format, calculating an enhancement coefficient of the pixel according to a value of a preset channel of the pixel and a preset threshold; For each pixel, according to the enhancement coefficient of the pixel and the value of the preset channel, the value of the preset channel after the pixel enhancement is calculated; as well as The value of the preset channel 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 a second image; wherein, when the value of the preset channel of the pixel and the preset threshold 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.

2. The method of claim 1, wherein: The preset threshold includes an upper threshold, a lower threshold and a maximum enhancement value, and the step of calculating the enhancement coefficient of the pixel according to the value of the preset channel of the pixel and the preset threshold includes: Calculating the saturation of the pixel according to the value of the preset channel of the pixel; and Calculating an enhancement coefficient of the pixel according to comparison results of the saturation of the pixel with the upper threshold and the lower threshold respectively; Wherein, when the saturation of the pixel is less than or equal to the lower threshold, the enhancement coefficient of the pixel is calculated according to the maximum enhancement value; When the saturation of the pixel is greater than the lower threshold and less than the upper threshold, calculating the enhancement coefficient of the pixel according to the maximum enhancement value, the upper threshold, the lower threshold and the saturation of the pixel; The value of the preset channel of the pixel and the preset threshold satisfying a preset condition includes: the saturation of the pixel is greater than or equal to the upper threshold.

3. The method of claim 2, wherein: The step of calculating the enhancement coefficient of the pixel according to the value of the preset channel of the pixel and the preset threshold comprises: Determine the region to which the pixel belongs in the first image, wherein the first image The preset thresholds for different regions are not exactly the same; and An enhancement coefficient of the pixel is calculated according to a preset threshold corresponding to the region to which the pixel belongs in the first image and a value of a preset channel of the pixel.

4. The method of claim 3, wherein: The region includes a special enhancement region and other regions except the special enhancement region, the lower limit threshold corresponding to the special enhancement region is a first threshold, the upper limit threshold corresponding to the special enhancement region is a second threshold, and the maximum enhancement value corresponding to the special enhancement region is a third threshold; the lower limit threshold corresponding to the other regions is the first threshold, the upper limit threshold corresponding to the other regions is a fourth threshold, and the maximum enhancement value corresponding to the other regions is the third threshold; wherein the first threshold is less than the fourth threshold, and the fourth threshold is less than the second threshold; Calculating the enhancement coefficient of the pixel according to a preset threshold corresponding to the region to which the pixel belongs in the first image and a value of a preset channel of the pixel includes: When the pixel belongs to a special enhancement area of ​​the first image, a second enhancement coefficient of the pixel is calculated according to the first threshold, the second threshold, the third threshold and a value of a preset channel of the pixel, where the second enhancement coefficient is an enhancement coefficient of the special enhancement area; In the case where the pixel belongs to other areas 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 a preset channel of the pixel, and the first enhancement coefficient is the enhancement coefficient of the other areas.

5. The method of claim 4, wherein: The special enhanced area is an area corresponding to the second quadrant in a rectangular coordinate system established with the preset channel as the horizontal coordinate and the vertical coordinate.

6. The method of claim 5, wherein: The other regions include a general enhancement region and a transition region, the transition region is adjacent to the special enhancement region; 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; Calculating the enhancement coefficient of the pixel according to a preset threshold corresponding to the region to which the pixel belongs in the first image and a value of a preset channel of the pixel includes: In the case where the pixel belongs to a general enhancement area of ​​the first image, the enhancement coefficient of the pixel is the first enhancement coefficient; In the case where the pixel belongs to the transition area of ​​the first image, the third enhancement coefficient of the pixel is determined according to the value of the preset channel of the pixel, the enhancement coefficient of the special enhancement area, the enhancement coefficient of the other areas and a preset display lookup table.

7. The method of claim 6, wherein: Determining the third enhancement coefficient of the pixel according to the value of the preset channel of the pixel, the enhancement coefficient of the special enhancement area, the enhancement coefficient of the other areas and a preset display lookup table includes: Calculate a query sequence number according to the value of a preset channel of the pixel; The preset display lookup table is searched with the query sequence number as an index to obtain the color parameter value of the pixel, and the third enhancement coefficient of the pixel is calculated according to the color parameter value of the pixel, the enhancement coefficient of the special enhancement area and the enhancement coefficient of the other areas.

8. The method of claim 6, wherein: The transition region is a region adjacent to the special enhanced region in the first quadrant and the third quadrant in the rectangular coordinate system.

9. The method according to any one of claims 1 to 8, further comprising: Before calculating the enhancement coefficient of each pixel in the first image of the preset color format according to the value of the preset channel of the pixel and the preset threshold, converting the third image not in the preset color format into the first image of the preset color format; After updating the value of the preset channel of the corresponding pixel in the first image according to the value of the preset channel after each pixel is enhanced to enhance the color saturation of the first image and obtaining the second image, the second image is converted into a fourth image in a target color format, and the target color format is the color format of the third image.

10. The method of claim 9, wherein: The preset color format is the HSV color format or the YUV color format.

11. A computer device comprising: at least one processor; as well as a storage device having at least one computer program stored thereon; When the at least one computer program is executed by the at least one processor, the at least one processor is enabled to implement the image color saturation enhancement method according to any one of claims 1 to 10.

12. A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the processor implements the method for enhancing the color saturation of an image according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Color independent reinforcement processing method

    CN101115211A

  • Adjusting method of image color saturation, device, and image processing chip

    CN106998456A

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

    CN110197470A

  • Image saturation enhancement method and system and electronic equipment

    CN113436126A

  • Print control apparatus having saturation enhancing function and corresponding print control method

    US20030072015A1