WO2019170007A1 - Image color adjustment method and device - Google Patents

Image color adjustment method and device Download PDF

Info

Publication number
WO2019170007A1
WO2019170007A1 PCT/CN2019/075780 CN2019075780W WO2019170007A1 WO 2019170007 A1 WO2019170007 A1 WO 2019170007A1 CN 2019075780 W CN2019075780 W CN 2019075780W WO 2019170007 A1 WO2019170007 A1 WO 2019170007A1
Authority
WO
WIPO (PCT)
Prior art keywords
color
saturation
image
pixel
parameter
Prior art date
Application number
PCT/CN2019/075780
Other languages
French (fr)
Chinese (zh)
Inventor
林威丞
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2019170007A1 publication Critical patent/WO2019170007A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/10Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from different wavelengths
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • H04N23/84Camera processing pipelines; Components thereof for processing colour signals
    • H04N23/88Camera processing pipelines; Components thereof for processing colour signals for colour balance, e.g. white-balance circuits or colour temperature control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • H04N9/646Circuits for processing colour signals for image enhancement, e.g. vertical detail restoration, cross-colour elimination, contour correction, chrominance trapping filters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • H04N9/73Colour balance circuits, e.g. white balance circuits or colour temperature control

Definitions

  • the present application relates to the field of electronic technologies, and in particular, to an image color adjustment method and apparatus.
  • the unprocessed original image has a problem of overall color cast (blue, yellow, or green), and the color of the deviation is affected by the color (color temperature) of the light source in the scene.
  • the Auto White Balance AWB module can calculate the color and color temperature of the light source in the photo environment to correct the image color cast and make the white object in the original scene. White appears in the image.
  • the white object will be white, but other colors are not accurate, and the saturation needs to be enhanced or weakened by other color adjustment modules to enhance the color style of the image.
  • the saturation of the image after being adjusted by the automatic white balance AWB module is adjusted according to the preset color parameter.
  • the saturation of different images is different. If the existing color adjustment method is used, it is easy to cause over-saturation of the image color, that is, the color of some areas has reached the strongest, and it is impossible to separate the shade. Therefore, how to make the effect of image color adjustment better becomes an urgent problem to be solved.
  • the embodiment of the present application provides an image color adjustment method and device, so as to improve the effect of image color adjustment and improve the efficiency of image color adjustment.
  • an embodiment of the present application provides an image color adjustment method, including:
  • the target image is an image after automatic white balance correction
  • the strong color pixel is a pixel point for characterizing the color characteristic of the image block
  • a small number of strong color pixels that best reflect the color characteristics of the image are extracted from the target image containing a large number of pixel points, and the color parameters are adjusted based on the strong color pixel points.
  • the workload of the calculation can be greatly reduced.
  • the strong color pixels can reflect the color characteristics of the target image, the accuracy and adaptability of the image color adjustment can be ensured. It can make the effect of image color adjustment better and improve the efficiency of image color adjustment.
  • the image color adjustment device determines, according to a color feature value of the strong color pixel corresponding to each image block of the target image, a feature of the strong color pixel corresponding to each image block. Saturation; according to the characteristic saturation of the strong color pixel points corresponding to each image block of the target image, the color parameters are adjusted, so that the color pixels corresponding to the respective color image pixels of the target image are color-adjusted by the adjusted color parameters. After the adjustment, the characteristic saturation of the corresponding strong color pixel points of each image block of the target image is not saturated.
  • the image color adjusting device cyclically adjusts the color parameter according to the characteristic saturation of the strongly colored pixel points adjusted each time, so that the color parameter can be made more precise, and the effect of the image color adjustment is better.
  • the color parameter comprises a color correction parameter, a color enhancement parameter, or a tone adjustment parameter.
  • the color parameter includes a color correction parameter, a color enhancement parameter, and a tone adjustment parameter; and the image color adjustment device is configured according to the target image
  • the image saturation parameter is adjusted according to the feature saturation of the strong color pixel points corresponding to each image block, so that the color image of the color pixel corresponding to each image block of the target image is corrected by the color correction parameter of the adjusted color correction parameter, and the target image
  • the characteristic saturation of the corresponding strong color pixel points of each image block is not saturated
  • the color enhancement parameter is adjusted according to the characteristic saturation of each color pixel point after the color correction of the adjusted color correction parameter, so that the After the color correction of the color correction parameters of the adjusted color correction parameters, the color saturation of the adjusted color enhancement parameters is enhanced, and the characteristic saturation of the corresponding strong color pixel points of each image block of the target image is not saturated
  • the characteristic saturation of each strong color pixel after the color enhancement of the adjusted color enhancement parameter is Adjusting the adjustment parameters to adjust, after
  • the image color adjusting device respectively corresponds to the strong color pixel points corresponding to the image blocks of the target image Feature saturation, adjusting the color parameter; obtaining the first pixel of the strong color pixel with the feature saturation higher than the first saturation threshold in each of the strong color pixels after the color adjustment of the adjusted color parameter The number of points; when the number of first pixels is greater than or equal to the first number threshold, the color parameter is lowered until the number of first pixels is less than the first number threshold.
  • the image color adjustment apparatus respectively corresponds to the strong color pixel points corresponding to the image blocks of the target image Feature saturation, adjusting the color parameter; obtaining the pixel points of the strong color pixels in the M high saturation range of each of the strong color pixels after the color adjustment of the adjusted color parameter Quantity; M high saturation ranges are preset saturation ranges from top to bottom for multiple saturation ranges, M is a positive integer greater than 1; at least one of M high saturation ranges When the number of pixels corresponding to the target high saturation range is greater than or equal to the second threshold corresponding to the target high saturation range, the color parameter is lowered until the number of pixels corresponding to the M high saturation ranges is less than M high saturations.
  • the range corresponds to a second number of thresholds.
  • the image color adjustment apparatus respectively corresponds to the strong color pixel points corresponding to the image blocks of the target image Feature saturation, adjusting the color parameter; obtaining the pixel points of the strong color pixels in the M high saturation range of each of the strong color pixels after the color adjustment of the adjusted color parameter
  • the image color adjustment device further includes a strong color pixel corresponding to each image block of the target image
  • the feature saturation is compared with the first saturation threshold, and the number of the third pixel points is determined.
  • the number of the third pixel points is that the corresponding feature saturation of the strong color pixel corresponding to each image block of the target image is smaller than the first saturation threshold.
  • the image color adjustment device acquires a pixel corresponding to each image block of the target image At least one target pixel whose brightness is higher than the first brightness threshold; N high saturation pixels are determined from the at least one target pixel, and the N high saturation pixels are at least one target pixel from which the reference saturation is high After the low ordering, the top N target pixel points, N is a positive integer greater than or equal to 1; according to the color values of the N high-saturation pixel points in each image block of the target image, the image blocks corresponding to the target image are respectively determined. The color feature value of a strong color pixel.
  • the pixel point whose brightness is higher than the first brightness threshold is filtered to filter the pixel point whose brightness is too low. Because the pixels with too low brightness are actually invisible to the naked eye, the saturation of such pixels may affect the adjustment of the color of the image, so this scheme can avoid the deviation of the color of the entire image.
  • the image color adjustment device acquires, in each pixel block of the target image, a hue corresponding to the first hue range And at least one target pixel having a brightness higher than the first brightness threshold.
  • color adjustment can be performed for a certain color or color range.
  • the image color adjustment device acquires scene information corresponding to the target image, and determines the scene information according to the scene information corresponding to the target image. Corresponding to the first hue range to be adjusted.
  • the reference saturation is saturation; or the reference saturation is the saturation and the brightness The combined value determined.
  • determining a high corresponding to each image block of the target image The color value of the saturated pixel is a color feature value of a strong color pixel corresponding to each image block of the target image;
  • N is greater than 1, an average value of color values of N high-saturation pixel points corresponding to each image block of the target image is respectively calculated; and an average value of color values of N high-saturation pixel points corresponding to each image block of the target image is determined.
  • a second aspect of the present application provides an image color adjustment device. It includes a cache processor, a memory, and optionally a communication interface.
  • the processor is coupled to the memory and communication interface, for example, the processor can be coupled to the memory and communication interface via a bus.
  • the communication interface is used to communicate with other devices.
  • the memory is used to store program code, directory data, and the like.
  • the processor is operative to perform any of the possible implementations of the first aspect or the first aspect described above.
  • a third aspect of the present application provides another image color adjustment apparatus, including an acquisition module, a parameter adjustment module, and a color adjustment module, and optionally a comparison module.
  • the above modules are used to implement the processor in the second aspect.
  • the image color adjustment device implements any of the above first aspect or the first aspect of the first aspect through the above module.
  • the present application provides a computer program product comprising: computer program code for causing a computer to perform the method of any of the possible implementations of the first aspect described above when the computer program code is run on a computer.
  • the present application provides a computer readable medium storing program code for causing a computer to perform the method of the implementation of the first aspect described above when the computer program code is run on a computer.
  • FIG. 1 is a schematic structural diagram of an image color adjustment system according to an embodiment of the present application.
  • FIG. 2 is a schematic flow chart of an image color adjustment method provided by an embodiment of the present application.
  • FIG. 3 is a schematic flow chart of another image color adjustment method provided by an embodiment of the present application.
  • 4a is an example of a strong color pixel point feature saturation histogram provided by an embodiment of the present application.
  • FIG. 4b is another example of a strong color pixel dot feature saturation histogram provided by an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of an image color adjustment apparatus according to an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of another image color adjustment apparatus according to an embodiment of the present application.
  • FIG. 1 is a schematic structural diagram of an image color adjustment system according to an embodiment of the present application.
  • the system may be an image signal processor (ISP).
  • the image color adjustment system includes an automatic white balance AWB module 101 and a color adjustment module 102.
  • the color adjustment module may specifically include a color correction (CC) 1021, a color enhancement module (CE) 1022, and a three-dimensional lookup table. At least one of a module (3D lookup table, 3DLut) 1023.
  • the input image is first corrected by the automatic white balance AWB module 101, and according to the saturation, brightness, and hue parameters of each pixel of the image corrected by the automatic white balance AWB module 101, it is determined that the correction can be represented.
  • the color feature value of the strong color pixel of the color feature of the image is formed, that is, a strong color map is formed, the color parameter of the color adjustment module 102 is adjusted according to the strong color map, and then the image corrected by the automatic white balance AWB module 101 is formed.
  • the color adjustment module 102 is input to the adjusted color adjustment module to obtain an output image with good color effect.
  • the color adjustment module 102 includes the color correction CC module 1021, the color enhancement CE module 1022, and the three-dimensional lookup table 3DLut module 1023
  • the image corrected by the automatic white balance AWB module 101 is sequentially subjected to the color correction CC module 1021 in order.
  • the Gamma module 1024 may be aligned through the brightness before being adjusted by the 3D lookup table 3DLut module 1023.
  • FIG. 2 is a schematic flowchart diagram of an image color adjustment method according to an embodiment of the present application, where the method includes but is not limited to the following steps:
  • the target image is an image after automatic white balance correction.
  • the automatic white balance AWB module can calculate the color and color temperature of the light source in the photographing environment to correct the image color shift, so that the white object in the original scene appears white in the image. That is to say, the image after the unprocessed original image is processed by the automatic white balance AWB module is the target image.
  • the target image is composed of a plurality of pixel points in the plurality of image blocks, each pixel point has a corresponding color value, and the image color adjusting device is based on the color value corresponding to the plurality of pixel points in each image block of the target image.
  • a color value of a strong color pixel corresponding to each image block may be obtained, and a strong color pixel corresponding to one image block is a pixel point that can represent the color characteristic of the image block.
  • the image color adjusting means extracts a "small image” including a plurality of strong color pixel points capable of reflecting the color characteristics of the target image from the target image, which is a "large image” including a plurality of pixel points.
  • S201 may specifically include S2011-S2013:
  • S2011 Acquire at least one target pixel point in which a brightness of each pixel block corresponding to each image block of the target image is higher than a first brightness threshold.
  • the color value of the pixel can be obtained.
  • the color value can be an RGB parameter of the RGB color space that converts the RGB parameters of the RGB color space into HSL (or HSV) parameters of the HSL (or HSV) color space.
  • R, G, and B represent the values of the red, green, and blue primary colors in each pixel.
  • H, S, and L (or V) represent the values of the three parameters of hue, saturation, and brightness, respectively. .
  • the pixel point whose brightness is higher than the first brightness threshold is filtered to filter the pixel point whose brightness is too low. Because the pixels whose brightness is too low are actually invisible to the naked eye, if the adjustment of the color of the image is affected due to the saturation of such pixel points, the color of the entire image may be deviated.
  • the target pixel needs to satisfy the condition that the hue conforms to the first hue range in addition to the brightness being higher than the first brightness threshold, that is, S2011 may further be: acquiring the target image.
  • the hue in each image block conforms to the first hue range and at least one target pixel whose brightness is higher than the first brightness threshold.
  • the first hue range may be preset. For example, if the user prefers to perform color adjustment for the red portion of the image, then the first hue range may be preset to a red corresponding hue range, thereby obtaining the target image.
  • the target pixel points that match the hue range corresponding to the red color are selected.
  • the first hue range may be determined according to a scene corresponding to the target image.
  • the scenario information corresponding to the target image may be acquired first, and then the first hue range to be adjusted corresponding to the scenario information is determined according to the scenario information.
  • the scene information corresponding to the target image may be determined by the scene recognition as a blue sky scene, and the first hue range may be a hue range corresponding to the blue color, so that the target image is matched with the target corresponding to the hue range corresponding to the blue color. pixel.
  • the N high-saturation pixel points are the top N target pixel points after the reference saturation is sorted from high to low in at least one target pixel, and N is a positive integer greater than or equal to 1.
  • the reference saturation can be saturation. That is to say, the saturation corresponding to at least one target pixel point included in each image block of the target image is sorted, and the top N target pixel points of the saturation ranking are obtained as N high-saturation pixel points.
  • the reference saturation may also be a composite value determined by the sum of saturation and brightness. For example, the following formula may be used to determine the integrated value corresponding to the pixel:
  • S is the saturation of the pixel
  • L is the brightness of the pixel
  • a is the weight of the saturation
  • b is the weight of the brightness. It should be noted that a is usually much larger than b.
  • the reference saturation ranking corresponding to multiple target pixel points in a target image block is shown in Table 1. Assuming N is 1, then target pixel 1 is a highly saturated pixel; assuming N is 2, then target pixel 1 and target pixel 2 are 2 highly saturated pixels.
  • Table 1 Reference saturation ranking table corresponding to at least one target pixel in the target image block (example)
  • S2013 Determine, according to color values of N high-saturation pixel points in each image block of the target image, color feature values of one strong color pixel corresponding to each image block of the target image.
  • each image block corresponds to only one high-saturation pixel, and then the color value of the high-saturation pixel corresponding to each image block of the target image is determined to be a strong color pixel corresponding to each image block of the target image.
  • Color feature value When N is greater than 1, each image block has N high-saturation pixel points, and the average value of the color values of the N high-saturation pixel points corresponding to each image block of the target image may be respectively calculated, and each target image is determined.
  • the average value of the color values of the N highly saturated pixels corresponding to the image block is the color feature value of the strong color pixel corresponding to each image block of the target image.
  • the color value of the highly saturated pixel is the color feature value of the strong color pixel, that is, the color value corresponding to the target pixel point 1 of the first reference saturation (R1, G1, B1);
  • the color eigenvalue of the strong color pixel is the average of the color values of the two highly saturated pixels (target pixel 1 and target pixel 2), ie (R1+R2)/2 , (G1+G2)/2, (B1+B2)/2.
  • the color parameter is a parameter used to adjust the color of the image.
  • the image color adjusting device can determine the feature saturation of each strong color pixel point. When the feature saturation of each strong color pixel point is large, the color of the target image is relatively strong. You can reduce the color parameters to avoid oversaturation of the image. Adjusting the color parameters in the embodiments of the present application may include reducing the color parameters. Further, the color parameter may include a color correction parameter, a color enhancement parameter, or a tone adjustment parameter, and the color parameter may further include a color correction parameter, a color enhancement parameter, and a tone adjustment parameter.
  • the color correction parameter is used to correct the image color
  • the color enhancement parameter is used to enhance the image color
  • the tone adjustment parameter is used to change the image color tone.
  • the color parameter adjusted by the image color adjustment device may be a color parameter of the color adjustment module.
  • the color adjustment module may be any one or two of a color correction module, a color enhancement module, and a three-dimensional lookup table module, and may also include a color correction module, a color enhancement module, and a three-dimensional lookup table module.
  • the method for adjusting the color parameters of different module designs can be specifically referred to the following description.
  • the method By adopting the method, a small number of strong color pixels which best reflect the color characteristics of the image can be extracted from the target image containing a large number of pixel points, and the color parameters are adjusted based on the strong color pixel points. First of all, due to the reduction of the number of pixels, the workload of the calculation can be greatly reduced. At the same time, since the strong color pixels can reflect the color characteristics of the target image, the accuracy and adaptability of the image color adjustment can be ensured. Therefore, the method can make the effect of image color adjustment better and improve the efficiency of image color adjustment.
  • S202 may specifically be:
  • the color parameter may refer to any one of a color correction parameter, a color enhancement parameter, and a tone adjustment parameter.
  • the color adjustment module may be a black box internally including a plurality of small adjustment modules, and the color parameters correspond to the entire color adjustment module. That is, the color adjustment module corresponds to a color parameter as a whole.
  • the color adjustment module may be any one of a color correction module, a color enhancement module, and a three-dimensional lookup table module.
  • the color parameter may be respectively corresponding to the color correction module, the color enhancement module, and the three-dimensional lookup table module.
  • color correction parameters any of color correction parameters, color parameters, and tone adjustment parameters.
  • the color adjustment module is a color correction module
  • the color correction parameter corresponding to the color correction module is adjusted until the color saturation of the adjusted color parameter, and the characteristic saturation of the strong color pixel corresponding to each image block of the target image respectively. But saturated.
  • the image color adjusting device may adjust the color of each strong color pixel according to the preset color parameter, and obtain the characteristics of the output color adjusted color pixels. Saturation; adjust the color parameters according to the characteristic saturation of the strong color pixels corresponding to each image block; then, according to the adjusted color parameters, perform the color-adjusted color pixels after the last output Color adjustment, obtain the characteristic saturation of each color pixel point after the color adjustment of the output, and so on, cyclically adjust the color parameter until the color of the adjusted color parameter is adjusted, and each image block of the target image
  • the characteristic saturation of the corresponding strong color pixel points is not saturated, indicating that the adjustment of the color parameter adjustment corresponding to the target image is completed, and the target image may be color-adjusted according to the adjusted color parameter.
  • the image color adjustment device may input each strong color pixel into the color adjustment module to obtain the characteristics of each strong color pixel adjusted according to the preset color parameter color. Saturation; adjust the color parameters of the color adjustment module according to the characteristic saturation of each color pixel after the color adjustment; then, input the color pixels after the color output of the last output is adjusted by the color parameter After the color adjustment module, the characteristic saturation of each color pixel point after the color adjustment of the output is obtained, and so on, the color parameter of the color adjustment module is cyclically adjusted until the color parameter of the adjusted color adjustment module After the color adjustment, the characteristic saturation of the corresponding strong color pixel points of each image block of the target image is not saturated.
  • the color adjustment module includes a color correction module, a color enhancement module, and a three-dimensional lookup table module
  • the color parameters may include color correction parameters, color enhancement parameters, and tone adjustment parameters. That is, the image color adjustment device needs to adjust the color parameter corresponding to the color correction module, the color parameter corresponding to the color enhancement module, and the color parameter corresponding to the three-dimensional lookup table module.
  • the image color adjustment device sequentially adjusts the color correction parameter, the color enhancement parameter, and the tone adjustment parameter.
  • the image color adjustment device adjusts the color correction parameters according to the feature saturation of the strong color pixel points corresponding to the image blocks of the target image, so that the respective color image pixels corresponding to the image blocks of the target image are adjusted.
  • the characteristic saturation of the corresponding strong color pixel points of each image block of the target image is not saturated; then, the characteristics of each strong color pixel point after the color correction according to the adjusted color correction parameter Saturation, the color enhancement parameter is adjusted, so that after the color correction of the color correction parameters of the adjusted color correction parameter is adjusted, the color of the adjusted color enhancement parameter is enhanced, and each image block of the target image is correspondingly strong.
  • the characteristic saturation of the color pixel is not saturated; finally, the tone adjustment parameter is adjusted according to the characteristic saturation of each color pixel after the color enhancement parameter of the adjusted color enhancement parameter, so that the adjusted color enhancement parameter is adjusted.
  • the tone adjustment parameter is adjusted after the tone adjustment
  • the characteristic saturation of the strong color pixel points corresponding to the respective image blocks of the target image is not saturated.
  • the color adjustment module the color correction module, the color enhancement module, and the three-dimensional lookup table module respectively adjust color correction parameters, color enhancement parameters, and tone adjustment parameters.
  • the color adjustment module may be any two of a color correction module, a color enhancement module, and a three-dimensional lookup table module.
  • the color parameters may include color correction parameters, color enhancements. Any of the parameters and tone adjustment parameters.
  • the color parameters corresponding to any two of the color correction module, the color enhancement module, and the three-dimensional lookup table module can be adjusted.
  • the image color adjusting device adjusts the color parameter according to the feature saturation of the strong color pixel corresponding to each image block of the target image; and obtains the adjusted color parameter.
  • the corresponding feature saturation is higher than the first pixel threshold of the first saturation threshold; when the first pixel number is greater than or equal to the first threshold , reducing the color parameter until the number of first pixels is less than the first number threshold.
  • the image color adjusting device performs color adjustment on each of the strong color pixel points (ie, the strong color image) obtained in S201, and then, according to the color characteristic values of the color pixels after the color adjustment, The characteristic saturation corresponding to each color pixel point after the color adjustment is determined.
  • the characteristic saturation threshold may be a preset threshold for measuring whether the feature saturation is too high.
  • the number of the strong color pixel points whose feature saturation is too high in the feature saturation corresponding to each strong color pixel point is obtained as the first pixel point number.
  • the first quantity threshold may be a fixed value set; the first quantity threshold may also be determined according to a product of a preset percentage and a number of image blocks of the target image, such as a target image having 900 image blocks, If the percentage is set to 10%, the first number threshold is 90. Further, the color parameter may be reduced to a preset color parameter value, or the color parameter may be adjusted according to a preset rule by a certain value, which is not limited herein.
  • color adjustment is performed on each color pixel point after the color adjustment, and whether the number of the first pixel points of the strong color pixel with the feature saturation higher than the first saturation threshold is greater than or equal to the first A number threshold is determined, and the loop is repeated until the number of first pixels is less than the first number threshold.
  • the image color adjusting device may divide the plurality of saturation ranges, and then perform histogram statistics on the number of feature saturations of the strong color pixels falling in the respective saturation ranges, thereby more intuitively obtaining the feature saturation is higher than The number of first pixels of the strong color pixel of the first saturation threshold.
  • the strong saturation pixel histogram saturation histogram shown in FIG. 4a the feature saturation S with a value range of 0 to 100 is divided into 100 saturation ranges, which are 0 ⁇ S ⁇ 1, 1 ⁇ S ⁇ 2...99 ⁇ S ⁇ 100, wherein the abscissa of the histogram is the saturation range, and the ordinate is the number of strong color pixels.
  • the statistical feature saturation statistics fall on the number of strong color pixels in each saturation range, which can form the strong saturation pixel point feature saturation histogram shown in Fig. 4a. Assuming that the first quantity threshold is 50 and the first saturation threshold is 98, using the strong color pixel point feature saturation histogram, it can be determined that the current strong color picture has 98 ⁇ S ⁇ 99 and 99 ⁇ S ⁇ 100.
  • the number of strong color pixels corresponding to the saturation range is 65 (40+25), that is, the number of first pixels is 65.
  • the image color adjusting device adjusts the color parameter according to the feature saturation of the strong color pixel corresponding to each image block of the target image; and obtains the adjusted color parameter.
  • the corresponding feature saturations are respectively in the number of pixels of the high-saturation pixel points in the M high saturation range; the M high-saturation ranges are preset in the plurality of saturation ranges from High to low ranks the top M saturation ranges, M is a positive integer greater than 1; when at least one of the M high saturation ranges corresponds to a target high saturation range, the number of pixels is greater than or equal to the target high saturation range
  • the color parameter of the color adjustment module is decreased until the number of pixel points corresponding to the M high saturation ranges are respectively smaller than the second quantity threshold corresponding to the M high saturation ranges.
  • the image color adjustment device may divide a plurality of saturation ranges, and the saturation ranges in which the saturation ranges are ranked as the M high saturation ranges. For example, there are 100 saturation ranges, which are 0 ⁇ S ⁇ 1, 1 ⁇ S ⁇ 2 ... 99 ⁇ S ⁇ 100. Assuming M is 3, the high saturation range is 97 ⁇ S ⁇ 98, 98 ⁇ Three saturation ranges of S ⁇ 99 and 99 ⁇ S ⁇ 100. Each high saturation range sets a corresponding second quantity threshold. For example, a second quantity threshold corresponding to 97 ⁇ S ⁇ 98 is 35, and a second quantity threshold corresponding to 98 ⁇ S ⁇ 99 is 30, 99 ⁇ S ⁇ 100. The corresponding second number threshold is 25.
  • the image color adjusting device performs color adjustment on each of the strong color pixel points (ie, the strong color image) obtained in S201, and then, according to the color characteristic values of the color pixels after the color adjustment, The characteristic saturation corresponding to each color pixel point after the color adjustment is determined. According to the characteristic saturation of each color pixel point after the color adjustment, the number of pixel points of the strong color pixel points whose feature saturation is respectively in the M high saturation range is obtained. When the number of pixel points corresponding to at least one target high saturation range of the M high saturation ranges is greater than or equal to the second number threshold corresponding to the target high saturation range, the feature saturation in the strong color map may be considered to be too high.
  • the color parameters can be lowered.
  • the second quantity threshold is similar to the setting method of the first quantity threshold.
  • the color-adjusted color pixels are input into the adjusted color adjustment module for color adjustment, and then it is determined whether at least one of the M high-saturation ranges corresponds to at least one target high-saturation range.
  • the number of points is greater than or equal to the second number threshold corresponding to the target high saturation range, and the loop is repeated until the number of pixels corresponding to the M high saturation ranges is less than the second number threshold corresponding to the M high saturation ranges, and the loop ends. .
  • the image color adjustment device can also intuitively determine the number of pixels corresponding to the M high saturation ranges by performing histogram statistics on the feature saturation of the strong color pixel points.
  • the image color adjusting device adjusts the color parameter according to the feature saturation of the strong color pixel corresponding to each image block of the target image; and obtains the adjusted color parameter.
  • the corresponding feature saturations are respectively in the number of pixels of the strong color pixels in the M high saturation range and the weight parameters corresponding to the M high-saturation ranges respectively;
  • M high saturation The degree range is a preset plurality of saturation ranges from high to low, and the top M saturation ranges, M is a positive integer greater than 1;
  • the second pixel number is calculated, and the second pixel number is high saturation
  • the image color adjustment device may divide the plurality of saturation ranges, and the saturation ranges in which the saturation ranges are ranked as the M high saturation ranges. For example, there are 100 saturation ranges, which are 0 ⁇ S ⁇ 1, 1 ⁇ S ⁇ 2 ... 99 ⁇ S ⁇ 100. Assuming M is 3, the high saturation range is 97 ⁇ S ⁇ 98, 98 ⁇ Three saturation ranges of S ⁇ 99 and 99 ⁇ S ⁇ 100. Each high saturation range sets a corresponding weight parameter. For example, the weight parameter corresponding to 97 ⁇ S ⁇ 98 is 30%, the weight parameter corresponding to 98 ⁇ S ⁇ 99 is 30%, and the weight parameter corresponding to 99 ⁇ S ⁇ 100. It is 40%.
  • the weight parameter may be preset, and the weight parameter has a corresponding relationship with the number of M, that is, the M high saturation ranges correspond to the M weight parameters, and the M weight parameters are followed by 1.
  • the image color adjusting device performs color adjustment on each of the strong color pixel points (ie, the strong color image) obtained in S201, and then determines the color-adjusted color pixels according to the color characteristic values of the color-adjusted color pixels. Corresponding feature saturation.
  • the number of pixel points of the strong color pixel points with the feature saturations in the M high saturation ranges and the weight parameters corresponding to the M high saturation ranges respectively are obtained according to the feature saturation corresponding to the color-adjusted color pixels.
  • the sum of the values obtained by multiplying the number of pixels corresponding to each high saturation range by the weight parameter corresponding to each high saturation range is calculated as the number of second pixel points.
  • the weight parameter corresponding to 97 ⁇ S ⁇ 98 is 30%
  • the number of pixels of the strong color pixel falling within the range is 30
  • the weight parameter corresponding to 98 ⁇ S ⁇ 99 is 30%
  • the weight falling in the range is strong.
  • the number of pixels of the color pixel is 40
  • the weight parameter corresponding to 99 ⁇ S ⁇ 100 is 40%
  • the number of pixels of the strong color pixel falling within the range is 25.
  • the third quantity threshold is similar to the setting method of the first quantity threshold. After adjusting the color parameters, color adjustment is performed on each color-adjusted pixel point after color adjustment, and then it is determined whether the number of second pixel points is greater than or equal to a third number threshold, and so on, until the number of second pixels is smaller than the third The number threshold, the end of the loop.
  • the image color adjusting device can also determine the number of pixels corresponding to the high saturation range by performing histogram statistics on the feature saturation of the strong color pixel points, thereby determining the number of second pixel points.
  • the three possible implementations of the above-mentioned design are applicable to the three possible implementation scenarios of the above-mentioned design.
  • the color adjustment module may include color. Any one, two or three of the correction module, the color enhancement module, and the three-dimensional look-up table module, or any implementation scenario in which the color adjustment module is a black box-like whole can follow the three possible implementations of the above design.
  • the method adjusts the color parameters of the color adjustment module cyclically.
  • the values M and the respective thresholds involved in the above three possible implementation manners may be different. .
  • the color parameter is adjusted according to the feature saturation of the strong color pixel corresponding to each image block of the target image, so that each image block of the target image respectively corresponds to the adjusted color of the strong color pixel.
  • the method further includes:
  • S2021 The characteristic saturation of the strong color pixel corresponding to each image block of the target image is compared with the first saturation threshold to determine the third pixel number. If the third pixel number is determined to be greater than or equal to the fourth quantity threshold, Then, S2022 is performed; if it is determined that the number of third pixel points is less than the fourth number threshold, then S202 is performed.
  • the first saturation threshold may be a predetermined threshold for measuring whether the feature saturation is too low.
  • the number of the third pixel points is the number of strong color pixel points in the corresponding strong color pixel points corresponding to the image blocks of the target image that are less than the first saturation threshold.
  • a third pixel number is determined and it is determined whether the number is greater than or equal to a fourth number threshold.
  • the fourth quantity threshold is similar to the setting method of the first quantity threshold. If it is determined that the number of the third pixel points is greater than or equal to the fourth number threshold, it may be stated that the feature saturation of most of the pixels in the strong color image is too low, and the target image is considered to be a weak color picture, then S2022 is executed, according to the preset.
  • the strong saturation pixel histogram saturation histogram may also be used herein to determine the number of feature saturations that are less than the first saturation threshold. For example, as shown in FIG. 4b, the strong color pixel point feature saturation histogram assumes that the fourth number threshold is 800 and the first saturation threshold is 2, then the current saturation map can be determined using the strong color pixel point feature saturation histogram.
  • the number of strong color pixels corresponding to the two saturation ranges of 0 ⁇ S ⁇ 1 and 1 ⁇ S ⁇ 2 is 805 (400+405), that is, the strong color corresponding to each image block of the target image S2032 is performed when the number of feature saturations of the feature saturation of the pixel that is less than the first saturation threshold is greater than or equal to the fourth number threshold.
  • the color parameter of the color adjustment module can be reduced to a preset value of the color parameter corresponding to the weak color picture, for example, the color parameter can be reduced to the lowest value;
  • the color parameter of the color adjustment module is adjusted according to a preset rule for the weak color picture, and is not limited herein.
  • the color reduction parameter in S2022 is a large-scale and one-step adjustment method, and S202 is a cyclically fine-tuning and then judging until the required loop adjustment process is reached. Since it is determined that the target image is a weak color picture, it is not necessary to perform the step of continuously fine-tuning the color parameter as in S202, but directly adjust to the color parameter suitable for the weak color picture.
  • S203 Perform color adjustment on the target image according to the adjusted color parameter.
  • S203 may perform color adjustment on the target image through the color adjustment module according to the adjusted color parameter.
  • S201-S202 completes the process of adapting the color parameters of the color adjustment module according to the strong color map of the target image. After that, the image color adjusting device can adjust the color of the target image according to the adjusted color parameter, thereby avoiding excessive color gain and causing over-saturation of the target image after color adjustment.
  • a small number of strong color pixels that best reflect the color characteristics of the image may be extracted from the target image including a plurality of pixel points.
  • Point adjust the color parameters based on the strong color pixels to output a target image with better color effect. It can greatly reduce the workload of the calculation. At the same time, it can also ensure the accuracy and adaptability of image color adjustment and improve the efficiency of image color adjustment.
  • FIG. 3 is a schematic flowchart diagram of another image color adjustment method according to an embodiment of the present application.
  • the color parameter includes a color correction parameter, a color enhancement parameter, and a tone adjustment parameter
  • the color adjustment module includes a color correction module, a color enhancement module, and a three-dimensional lookup table module.
  • the method includes but is not limited to the following steps:
  • the image color adjustment device may acquire the scene information corresponding to the target image.
  • the scene information corresponding to the target image indicates what kind of scene is present in the target image, such as a blue sky scene, a green scene, a night scene, or a gourmet scene.
  • the scene information corresponding to the first screen may be determined according to various characteristics such as the color, shape, and the like of the object in the image captured by the target image. Further, the scene information may be extracted from the target image by the image color adjustment device itself, or may be obtained by the other device after the other device recognizes the extracted scene information, and is not specifically limited herein.
  • the range of hue that requires color adjustment can also be different for different scenarios. For example, in a green scene, it is necessary to adjust the color of the pixel of the green hue range, and other pixels may not be concerned. Therefore, the correspondence between various scene information and the hue range can be set in advance, for example, it can be a scene hue range mapping table as shown in Table 2. Further, based on the scene information corresponding to the acquired target image, the image color adjustment device may determine a first hue range to be adjusted for the target image. Taking Table 2 as an example, if it is determined that the scene information corresponding to the target image is a blue sky scene, the first hue range to be adjusted is 34-53.
  • S303 and S2011 the difference between S303 and S2011 is that, in addition to the pixel points whose brightness corresponding to the pixel point is higher than the first brightness threshold, it is necessary to filter the pixel points whose hue conforms to the first hue range. That is to say, while filtering the pixel points whose brightness is too low, the pixel points in the first hue range to be adjusted corresponding to the scene information are also filtered out, so that the color adjustment is more targeted.
  • S304-S305 For the specific implementation of S304-S305, refer to S2012-S2013, and details are not described here.
  • S307 Compare a feature saturation of a strong color pixel corresponding to each image block of the target image with a first saturation threshold, and determine a third pixel number; if it is determined that the third pixel number is greater than or equal to a fourth quantity threshold, Then, S308 and S311 are performed, and if it is determined that the number of third pixel points is less than the fourth number threshold, S309-S312 is performed.
  • the image color adjusting device inputs each strong color pixel into the color correction module to obtain the characteristic saturation of the output color corrected color pixels, and corrects the color according to the characteristic saturation of each color pixel after the color correction.
  • the color correction parameters of the module are adjusted.
  • the color-corrected color pixels of the last output color are input into the color correction module adjusted by the color correction parameter, and the characteristic saturation of the color-corrected color pixels after the output color correction is obtained, and so on.
  • the color correction parameter of the color correction module is cyclically adjusted until the characteristic saturation of each color pixel of the color correction module after the color correction parameter adjusted by the output is saturated.
  • the image color adjusting device inputs the strong color pixels adjusted by S309 into the color enhancement module, and obtains the characteristic saturation of the color pixels after the color enhancement of the output, and saturates according to the characteristics of the color pixels after the color enhancement. Degree, adjust the color enhancement parameters of the color enhancement module. Then, the color pixels that have been enhanced by the last output are input into the color enhancement module adjusted by the color enhancement parameter, and the characteristic saturation of each color pixel after the color enhancement is obtained, and so on.
  • the color enhancement parameters of the color enhancement module are cyclically adjusted until the color saturation of the color enhancement module adjusted by the color enhancement parameter is respectively saturated with the characteristic saturation of each of the strong color pixels.
  • S311 Adjust the tone adjustment parameter according to the characteristic saturation of each of the strong color pixels after the color enhancement parameter of the adjusted color enhancement parameter, so that the color pixels of the adjusted color enhancement parameter are enhanced. After the tone adjustment of the adjusted tone adjustment parameter, the feature saturation of the strong color pixel corresponding to each image block of the target image is not saturated.
  • the image color adjusting device inputs the strong color pixels adjusted by S310 into the three-dimensional lookup table module, and obtains the characteristic saturation of the color tone pixels after the color tone adjustment, and the characteristics of the strong color pixels according to the color tone adjustment. Saturation, adjusts the tonal adjustment parameters of the 3D lookup table module. Then, the strong color pixels after the last color tone adjustment are input into the three-dimensional lookup table module adjusted by the tone adjustment parameter, and the characteristic saturation of each color pixel point after the tone adjustment is obtained, and so on.
  • the loop adjustment parameter of the three-dimensional look-up table module is cyclically adjusted until the characteristic saturation of each of the strong color pixels after the tone adjustment of the output three-dimensional look-up table module adjusted by the tone adjustment parameter is not saturated.
  • the image color adjustment device may further adjust the color enhanced pixel points by the brightness alignment module.
  • the brightness in FIG. 1 is aligned with the Gamma module 1024.
  • the brightness alignment module can first adjust the brightness of each color pixel after the color enhancement, and then adjust the tone adjustment parameters of the three-dimensional lookup table module according to the intensity of the highlighted color pixels, so that the three-dimensional search is performed.
  • the adjustment of the table module can be more accurate.
  • the color adjustment module includes a color correction module, a color enhancement module, and a three-dimensional lookup table module.
  • the color parameter of the adjusted color adjustment module can be used to adjust the color of the target image through the color adjustment module, that is, the target image Input the above-mentioned adjusted color correction module, color enhancement module and three-dimensional look-up table module for color adjustment, so as to avoid over-saturation of the target image after color adjustment caused by excessive color gain.
  • a small number of strong color pixels that best reflect the color characteristics of the image may be extracted from the target image including a plurality of pixel points.
  • Point adjust the color parameters based on the strong color pixels to output a target image with better color effect. It can greatly reduce the workload of the calculation. At the same time, it can also ensure the accuracy and adaptability of image color adjustment and improve the efficiency of image color adjustment.
  • the image color adjustment device includes hardware structures and/or software modules corresponding to the execution of the respective functions in order to implement the above functions.
  • the embodiments of the present application can be implemented in a combination of hardware or hardware and computer software in combination with the elements of the examples and algorithm steps described in the embodiments disclosed in the application. Whether a function is implemented in hardware or computer software to drive hardware depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the technical solutions of the embodiments of the present application.
  • the embodiment of the present application may perform the division of the function module or the function unit on the image color adjustment device according to the above method example.
  • each function module or function unit may be divided according to each function, or two or more functions may be integrated in the In a processing module or processing unit.
  • the above integrated modules or units can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules or units in the embodiments of the present application is schematic, and is only a logical function division. In actual implementation, there may be another division manner. Please see the specifics below.
  • FIG. 5 is a schematic structural diagram of an image color adjustment apparatus according to an embodiment of the present application.
  • the apparatus can be used to implement the image color adjustment apparatus of the embodiment shown in Fig. 2 or Fig. 3 described above.
  • the device includes:
  • the obtaining module 501 is configured to obtain a color feature value of a strong color pixel point for each image block of the target image, where the target image is an image after automatic white balance correction, and the strong color pixel point is used to represent the image The pixel point of the color characteristic of the block;
  • the parameter adjustment module 502 is configured to adjust a color parameter according to a color feature value of a strong color pixel corresponding to each image block of the target image;
  • the color adjustment module 503 is configured to perform color adjustment on the target image according to the adjusted color parameter.
  • the parameter adjustment module 502 is specifically configured to:
  • the color parameter includes a color correction parameter or a tone adjustment parameter.
  • the color parameter includes a color correction parameter, a color enhancement parameter, and a tone adjustment parameter
  • the parameter adjustment module 502 is specifically configured to:
  • the parameter adjustment module 502 is specifically configured to:
  • the color parameter is decreased until the number of the first pixel points is less than the first number threshold.
  • the parameter adjustment module 502 is specifically configured to:
  • the corresponding feature saturation is respectively in the number of pixels of the strong color pixel points of the M high saturation range; the M high saturation
  • the degree range is a preset plurality of saturation ranges from high to low ranked after the top M saturation ranges, and M is a positive integer greater than one;
  • the color parameter is lowered until the M
  • the number of pixels corresponding to each of the high saturation ranges is smaller than the second number threshold corresponding to the M high saturation ranges respectively.
  • the parameter adjustment module 502 is specifically configured to:
  • the corresponding feature saturation is in the number of pixels of the high color saturation pixel of the M high saturation range and the M high saturation
  • the weight ranges respectively correspond to the weight ranges;
  • the M high saturation ranges are preset saturation ranges of the top M after the plurality of saturation ranges are sorted from high to low, and M is a positive integer greater than 1;
  • the color parameter is decreased until the number of the second pixel points is less than the third number threshold.
  • the acquiring module 501 is further configured to: compare a feature saturation of a strong color pixel corresponding to each image block of the target image with a first saturation threshold, and determine a third pixel number, The number of the third pixel points is the number of the strong color pixel points corresponding to the feature saturation of the strong color pixel corresponding to each image block of the target image that is smaller than the first saturation threshold;
  • the device also includes:
  • the comparing module 504 is configured to determine that the number of the third pixel points is less than a fourth number threshold.
  • the obtaining module 501 is specifically configured to:
  • N high-saturation pixel points from the at least one target pixel point, wherein the N high-saturation pixel points are the top N target after the reference saturation is sorted from high to low in the at least one target pixel point a pixel, where N is a positive integer greater than or equal to 1;
  • the obtaining module 501 is specifically configured to:
  • the hue conforms to the first hue range and the at least one target pixel whose brightness is higher than the first brightness threshold.
  • the obtaining module 501 is further configured to:
  • the reference saturation is saturation; or the reference saturation is a comprehensive value determined by the saturation and the brightness.
  • the acquiring 501 module is specifically configured to:
  • N is equal to 1, determining that a color value of a high-saturation pixel corresponding to each image block of the target image is a color feature value of a strong color pixel corresponding to each image block of the target image;
  • N is greater than 1, respectively, calculating an average value of color values of N high-saturation pixel points corresponding to each image block of the target image; determining color of N high-saturation pixel points corresponding to each image block of the target image
  • the average value of the values is a color feature value of one strong color pixel corresponding to each image block of the target image.
  • FIG. 6 is a schematic structural diagram of another image color adjustment apparatus according to an embodiment of the present application.
  • the image color adjustment apparatus 600 shown in FIG. 6 includes a processor 601, and the processor 601 is configured to implement the acquisition module in FIG. 501. An action performed by any one of the parameter adjustment module 502, the color adjustment module 503, and the comparison module 504.
  • the processor 601 and the transceiver 603 are communicatively coupled, such as by a bus.
  • the image color adjustment device 600 may also include a memory 602.
  • the memory 602 is configured to store program code and data for execution by the image color adjustment device 600, and the processor 601 is configured to execute the application code stored in the memory 602 to implement the image color adjustment device provided by the embodiment shown in FIG. Actions.
  • the image color adjustment device 600 may further include a transceiver 603 for supporting information transmission between the image color adjustment device 600 and other terminal devices.
  • the image color adjustment device 600 may include one or more processors, and the structure of the image color adjustment device 600 does not constitute a limitation on the embodiment of the present invention.
  • the processor 601 can be a central processing unit (CPU), a network processor (NP), a hardware chip, or any combination thereof.
  • the hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof.
  • the PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a general array logic (GAL), or any combination thereof.
  • the memory 602 may include a volatile memory such as a random access memory (RAM); the memory 602 may also include a non-volatile memory such as a read-only memory (read- Only memory, ROM), flash memory, hard disk drive (HDD) or solid-state drive (SSD); the memory 602 may also include a combination of the above types of memories.
  • RAM random access memory
  • ROM read- Only memory
  • HDD hard disk drive
  • SSD solid-state drive
  • the memory 602 may also include a combination of the above types of memories.
  • a computer storage medium which can be used to store computer software instructions used in the image color adjustment device in the embodiment shown in FIG. 2 to FIG. 3, and includes an image for performing the above embodiment.
  • the program designed by the color adjustment device includes, but is not limited to, a flash memory, a hard disk, a solid state disk.
  • a computer program product is also provided.
  • the image color adjustment method designed for the image color adjusting device in the embodiment of FIG. 2 to FIG. 3 may be executed.
  • the above embodiments it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof.
  • software it may be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer instructions.
  • the computer program instructions When the computer program instructions are loaded and executed on a computer, the processes or functions described in accordance with embodiments of the present invention are generated in whole or in part.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • the computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be from a website site, computer, server or data center Transfer to another website site, computer, server, or data center by wire (eg, coaxial cable, fiber optic, digital subscriber line (DSL), or wireless (eg, infrared, wireless, microwave, etc.).
  • the computer readable storage medium can be any available media that can be accessed by a computer or a data storage device such as a server, data center, or the like that includes one or more available media.
  • the usable medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (such as a solid state disk (SSD)).
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Abstract

Embodiments of the present application provide an image color adjustment method and device. The method comprises: obtaining a color characteristic value of a strong color pixel point for each image block of a target image, the strong color pixel point being a pixel point for reflecting the color characteristics of the image block; adjusting a color parameter according to the color characteristic value of the strong color pixel point respectively corresponding to each image block of the target image; and performing color adjustment on the target image according to the adjusted color parameter. By means of the present invention, a small number of strong color pixel points that best reflect the color characteristics of a target image can be extracted from the image comprising a large number of pixel points, and a color parameter can be adjusted on the basis of the strong color pixel points. In this way, the calculation workload can be greatly reduced; moreover, the accuracy and adaptability of image color adjustment can also be ensured. Thus, the effect of image color adjustment may be better, and the efficiency of image color adjustment may be improved.

Description

图像色彩调整方法及装置Image color adjustment method and device 技术领域Technical field
本申请涉及电子技术领域,尤其涉及一种图像色彩调整方法及装置。The present application relates to the field of electronic technologies, and in particular, to an image color adjustment method and apparatus.
背景技术Background technique
在通过数字相机或者手机等终端设备拍照时,未经处理的原始图像存在整体偏色(偏蓝色、黄色或绿色)的问题,偏差的颜色受场景中光源颜色(色温)的影响。要消除此整体偏色必须透过自动白平衡(Auto white balance,AWB)模块,自动白平衡AWB模块可以计算出拍照环境下的光源颜色与色温,以修正图像色偏,使原本场景中白色对象在图像中显现白色。但是经过自动白平衡AWB模块校正后的图像,白色对象会是白色,但其他色彩并不准确,需要通过其他色彩调整模块将其饱和度增强或减弱,以提升图像的色彩风格。When photographing through a terminal device such as a digital camera or a mobile phone, the unprocessed original image has a problem of overall color cast (blue, yellow, or green), and the color of the deviation is affected by the color (color temperature) of the light source in the scene. To eliminate this overall color cast, you must pass the Auto White Balance (AWB) module. The Auto White Balance AWB module can calculate the color and color temperature of the light source in the photo environment to correct the image color cast and make the white object in the original scene. White appears in the image. However, after the image corrected by the automatic white balance AWB module, the white object will be white, but other colors are not accurate, and the saturation needs to be enhanced or weakened by other color adjustment modules to enhance the color style of the image.
现有的色彩调整方式中,都是按照预设的色彩参数对经过自动白平衡AWB模块调整之后的图像进行饱和度的调整。但是实际上,不同的图像所适合的饱和度是不同的,如果按照现有的色彩调整方式,容易造成图像色彩的过饱和,即一些区域的色彩已经达到最强,已经无法分出浓淡。因此,如何使图像色彩调整的效果更好成为亟待解决的问题。In the existing color adjustment mode, the saturation of the image after being adjusted by the automatic white balance AWB module is adjusted according to the preset color parameter. However, in fact, the saturation of different images is different. If the existing color adjustment method is used, it is easy to cause over-saturation of the image color, that is, the color of some areas has reached the strongest, and it is impossible to separate the shade. Therefore, how to make the effect of image color adjustment better becomes an urgent problem to be solved.
发明内容Summary of the invention
本申请实施例提供了一种图像色彩调整方法及装置,以期使图像色彩调整的效果更好,并且提高图像色彩调整的效率。The embodiment of the present application provides an image color adjustment method and device, so as to improve the effect of image color adjustment and improve the efficiency of image color adjustment.
第一方面,本申请实施例提供了一种图像色彩调整方法,包括:In a first aspect, an embodiment of the present application provides an image color adjustment method, including:
针对目标图像的每个图像块获取一个强彩像素点的颜色特征值,目标图像为经过自动白平衡校正后的图像,强彩像素点为用于表征图像块的色彩特性的像素点;Obtaining a color feature value of a strong color pixel for each image block of the target image, the target image is an image after automatic white balance correction, and the strong color pixel is a pixel point for characterizing the color characteristic of the image block;
根据目标图像的各图像块分别对应的强彩像素点的颜色特征值调整色彩参数;Adjusting the color parameter according to the color feature value of the strong color pixel corresponding to each image block of the target image;
按照调整后的色彩参数对目标图像进行色彩调整。Color adjustment of the target image according to the adjusted color parameters.
在该技术方案中,从包含大量像素点的目标图像中提取出最能反映其图像色彩特征的少量强彩像素点,基于强彩像素点对色彩参数进行调整。首先,由于像素点数量的减少,可以极大的减少运算的工作量;同时,因为强彩像素点能够反映目标图像的色彩特征,因此也能够保证图像色彩调整的精准度和适应性。可以使图像色彩调整的效果更好,且提高图像色彩调整的效率。In the technical solution, a small number of strong color pixels that best reflect the color characteristics of the image are extracted from the target image containing a large number of pixel points, and the color parameters are adjusted based on the strong color pixel points. First of all, due to the reduction of the number of pixels, the workload of the calculation can be greatly reduced. At the same time, since the strong color pixels can reflect the color characteristics of the target image, the accuracy and adaptability of the image color adjustment can be ensured. It can make the effect of image color adjustment better and improve the efficiency of image color adjustment.
在第一方面的第一种可能的实现方式中,图像色彩调整装置根据目标图像的各图像块分别对应的强彩像素点的颜色特征值,确定各图像块分别对应的强彩像素点的特征饱和度;根据目标图像的各图像块分别对应的强彩像素点的特征饱和度,对色彩参数进行调整,使得目标图像的各图像块分别对应的强彩像素点经调整后的色彩参数进行色彩调整之后,目标图像的各图像块分别对应的强彩像素点的特征饱和度不过饱和。In a first possible implementation manner of the first aspect, the image color adjustment device determines, according to a color feature value of the strong color pixel corresponding to each image block of the target image, a feature of the strong color pixel corresponding to each image block. Saturation; according to the characteristic saturation of the strong color pixel points corresponding to each image block of the target image, the color parameters are adjusted, so that the color pixels corresponding to the respective color image pixels of the target image are color-adjusted by the adjusted color parameters. After the adjustment, the characteristic saturation of the corresponding strong color pixel points of each image block of the target image is not saturated.
在该技术方案中,图像色彩调整装置根据每次调整的强彩像素点的特征饱和度,循环 调整色彩参数,可以使色彩参数更加精确,从而图像色彩调整的效果更好。In the technical solution, the image color adjusting device cyclically adjusts the color parameter according to the characteristic saturation of the strongly colored pixel points adjusted each time, so that the color parameter can be made more precise, and the effect of the image color adjustment is better.
结合第一方面的第一种可能的实现方式,在第一方面的第二种可能的实现方式中,色彩参数包括色彩校正参数、色彩增强参数或色调调整参数。In conjunction with the first possible implementation of the first aspect, in a second possible implementation of the first aspect, the color parameter comprises a color correction parameter, a color enhancement parameter, or a tone adjustment parameter.
结合第一方面的第一种可能的实现方式,在第一方面的第三种可能的实现方式中,色彩参数包括色彩校正参数、色彩增强参数和色调调整参数;图像色彩调整装置根据目标图像的各图像块分别对应的强彩像素点的特征饱和度,对色彩校正参数进行调整,使得目标图像的各图像块分别对应的强彩像素点经调整后的色彩校正参数的色彩校正后,目标图像的各图像块分别对应的强彩像素点的特征饱和度不过饱和;根据经调整后的色彩校正参数的色彩校正后的各强彩像素点的特征饱和度,对色彩增强参数进行调整,使得经调整后的色彩校正参数的色彩校正后的各强彩像素点经调整后的色彩增强参数的色彩增强后,目标图像的各图像块分别对应的强彩像素点的特征饱和度不过饱和;根据经调整后的色彩增强参数的色彩增强后的各强彩像素点的特征饱和度,对色调调整参数进行调整,使得经调整后的色彩增强参数的色彩增强后的各强彩像素点经调整后的色调调整参数的色调调整后,目标图像的各图像块分别对应的强彩像素点的特征饱和度不过饱和。In conjunction with the first possible implementation of the first aspect, in a third possible implementation of the first aspect, the color parameter includes a color correction parameter, a color enhancement parameter, and a tone adjustment parameter; and the image color adjustment device is configured according to the target image The image saturation parameter is adjusted according to the feature saturation of the strong color pixel points corresponding to each image block, so that the color image of the color pixel corresponding to each image block of the target image is corrected by the color correction parameter of the adjusted color correction parameter, and the target image The characteristic saturation of the corresponding strong color pixel points of each image block is not saturated; the color enhancement parameter is adjusted according to the characteristic saturation of each color pixel point after the color correction of the adjusted color correction parameter, so that the After the color correction of the color correction parameters of the adjusted color correction parameters, the color saturation of the adjusted color enhancement parameters is enhanced, and the characteristic saturation of the corresponding strong color pixel points of each image block of the target image is not saturated; The characteristic saturation of each strong color pixel after the color enhancement of the adjusted color enhancement parameter is Adjusting the adjustment parameters to adjust, after the color enhancement of the adjusted color enhancement parameter is adjusted, the color tone of the adjusted color tone adjustment parameter is adjusted, and each image block of the target image corresponds to the strong color pixel point respectively. Characteristic saturation is not saturated.
结合第一方面的第一种或第二种可能的实现方式,在第一方面的第四种可能的实现方式中,图像色彩调整装置根据目标图像的各图像块分别对应的强彩像素点的特征饱和度,对色彩参数进行调整;获取经调整后的色彩参数的色彩调整后的各强彩像素点中,对应的特征饱和度高于第一饱和度阈值的强彩像素点的第一像素点数量;当第一像素点数量大于或等于第一数量阈值时,降低色彩参数,直到第一像素点数量小于第一数量阈值。In conjunction with the first or second possible implementation of the first aspect, in a fourth possible implementation manner of the first aspect, the image color adjusting device respectively corresponds to the strong color pixel points corresponding to the image blocks of the target image Feature saturation, adjusting the color parameter; obtaining the first pixel of the strong color pixel with the feature saturation higher than the first saturation threshold in each of the strong color pixels after the color adjustment of the adjusted color parameter The number of points; when the number of first pixels is greater than or equal to the first number threshold, the color parameter is lowered until the number of first pixels is less than the first number threshold.
结合第一方面的第一种或第二种可能的实现方式,在第一方面的第五种可能的实现方式中,图像色彩调整装置根据目标图像的各图像块分别对应的强彩像素点的特征饱和度,对色彩参数进行调整;获取经调整后的色彩参数的色彩调整后的各强彩像素点中,对应的特征饱和度分别处于M个高饱和度范围的强彩像素点的像素点数量;M个高饱和度范围为预设的多个饱和度范围从高到低排序后排名前M个的饱和度范围,M为大于1的正整数;当M个高饱和度范围中至少一个目标高饱和度范围对应的像素点数量大于或等于目标高饱和度范围对应的第二数量阈值时,降低色彩参数,直到M个高饱和度范围分别对应的像素点数量均小于M个高饱和度范围分别对应的第二数量阈值。In conjunction with the first or second possible implementation of the first aspect, in a fifth possible implementation manner of the first aspect, the image color adjustment apparatus respectively corresponds to the strong color pixel points corresponding to the image blocks of the target image Feature saturation, adjusting the color parameter; obtaining the pixel points of the strong color pixels in the M high saturation range of each of the strong color pixels after the color adjustment of the adjusted color parameter Quantity; M high saturation ranges are preset saturation ranges from top to bottom for multiple saturation ranges, M is a positive integer greater than 1; at least one of M high saturation ranges When the number of pixels corresponding to the target high saturation range is greater than or equal to the second threshold corresponding to the target high saturation range, the color parameter is lowered until the number of pixels corresponding to the M high saturation ranges is less than M high saturations. The range corresponds to a second number of thresholds.
结合第一方面的第一种或第二种可能的实现方式,在第一方面的第六种可能的实现方式中,图像色彩调整装置根据目标图像的各图像块分别对应的强彩像素点的特征饱和度,对色彩参数进行调整;获取经调整后的色彩参数的色彩调整后的各强彩像素点中,对应的特征饱和度分别处于M个高饱和度范围的强彩像素点的像素点数量以及M个高饱和度范围分别对应的权重参数;M个高饱和度范围为预设的多个饱和度范围从高到低排序后排名前M个的饱和度范围,M为大于1的正整数;计算第二像素点数量,第二像素点数量为各高饱和度范围分别对应的像素点数量与各高饱和度范围对应的权重参数相乘后得到的数值之和;当第二像素点数量大于或等于第三数量阈值时,降低色彩参数,直到第二像素点数量小于第三数量阈值。In conjunction with the first or second possible implementation of the first aspect, in a sixth possible implementation manner of the first aspect, the image color adjustment apparatus respectively corresponds to the strong color pixel points corresponding to the image blocks of the target image Feature saturation, adjusting the color parameter; obtaining the pixel points of the strong color pixels in the M high saturation range of each of the strong color pixels after the color adjustment of the adjusted color parameter The weight parameter corresponding to the quantity and the M high saturation ranges respectively; the M high saturation ranges are the saturation ranges of the top M after the predetermined plurality of saturation ranges are sorted from high to low, and M is greater than 1 An integer; the number of second pixels is calculated, and the number of the second pixels is a sum of values obtained by multiplying the number of pixels corresponding to each high saturation range by the weight parameter corresponding to each high saturation range; when the second pixel is When the number is greater than or equal to the third number threshold, the color parameter is lowered until the number of second pixels is less than the third number threshold.
结合第一方面的第一种至第六种可能的实现方式,在第一方面的第七种可能的实现方式中,图像色彩调整装置还将目标图像的各图像块分别对应的强彩像素点的特征饱和度与 第一饱和度阈值比较,确定第三像素点数量,第三像素点数量为目标图像的各图像块分别对应的强彩像素点中对应的特征饱和度小于第一饱和度阈值的强彩像素点的数量;确定第三像素点数量小于第四数量阈值。In conjunction with the first to sixth possible implementations of the first aspect, in a seventh possible implementation manner of the first aspect, the image color adjustment device further includes a strong color pixel corresponding to each image block of the target image The feature saturation is compared with the first saturation threshold, and the number of the third pixel points is determined. The number of the third pixel points is that the corresponding feature saturation of the strong color pixel corresponding to each image block of the target image is smaller than the first saturation threshold. The number of strong color pixels; determining that the number of third pixels is less than the fourth number threshold.
结合第一方面和第一方面的第一种至第七种可能的实现方式,在第一方面的第八种可能的实现方式中,图像色彩调整装置获取目标图像的各图像块分别对应的像素点中亮度高于第一亮度阈值的至少一个目标像素点;从至少一个目标像素点中确定出N个高饱和像素点,N个高饱和像素点为至少一个目标像素点中参考饱和度从高到低排序后排名前N个的目标像素点,N为大于等于1的正整数;根据目标图像的各图像块中N个高饱和像素点的颜色值,确定目标图像的各图像块分别对应的一个强彩像素点的颜色特征值。With reference to the first aspect and the first to seventh possible implementation manners of the first aspect, in an eighth possible implementation manner of the first aspect, the image color adjustment device acquires a pixel corresponding to each image block of the target image At least one target pixel whose brightness is higher than the first brightness threshold; N high saturation pixels are determined from the at least one target pixel, and the N high saturation pixels are at least one target pixel from which the reference saturation is high After the low ordering, the top N target pixel points, N is a positive integer greater than or equal to 1; according to the color values of the N high-saturation pixel points in each image block of the target image, the image blocks corresponding to the target image are respectively determined. The color feature value of a strong color pixel.
在该技术方案中,筛选亮度高于第一亮度阈值的像素点,是为了过滤亮度太低的像素点。因为亮度过低的像素点对于肉眼实际是不可见的,这类像素点的饱和度可能影响图像色彩的调整,因此本方案可以避免整个图像色彩出现偏差。In this technical solution, the pixel point whose brightness is higher than the first brightness threshold is filtered to filter the pixel point whose brightness is too low. Because the pixels with too low brightness are actually invisible to the naked eye, the saturation of such pixels may affect the adjustment of the color of the image, so this scheme can avoid the deviation of the color of the entire image.
结合第一方面的第八种可能的实现方式,在第一方面的第九种可能的实现方式中,图像色彩调整装置获取目标图像的各图像块分别对应的像素点中色相符合第一色相范围和亮度高于第一亮度阈值的至少一个目标像素点。In conjunction with the eighth possible implementation of the first aspect, in a ninth possible implementation manner of the first aspect, the image color adjustment device acquires, in each pixel block of the target image, a hue corresponding to the first hue range And at least one target pixel having a brightness higher than the first brightness threshold.
在该技术方案中,可以针对某一种颜色或者颜色范围进行色彩调整。In this technical solution, color adjustment can be performed for a certain color or color range.
结合第一方面的第九种可能的实现方式,在第一方面的第十种可能的实现方式中,图像色彩调整装置获取目标图像对应的场景信息;根据目标图像对应的场景信息,确定场景信息对应的待调整的第一色相范围。With reference to the ninth possible implementation manner of the first aspect, in a tenth possible implementation manner of the first aspect, the image color adjustment device acquires scene information corresponding to the target image, and determines the scene information according to the scene information corresponding to the target image. Corresponding to the first hue range to be adjusted.
结合第一方面的第八种至第十种可能的实现方式,在第一方面的第十一种可能的实现方式中,参考饱和度为饱和度;或,参考饱和度为饱和度与亮度共同确定的综合值。With reference to the eighth to the tenth possible implementation manners of the first aspect, in the eleventh possible implementation manner of the first aspect, the reference saturation is saturation; or the reference saturation is the saturation and the brightness The combined value determined.
结合第一方面的第八种至第十一种可能的实现方式,在第一方面的第十二种可能的实现方式中,当N等于1时,确定目标图像的各图像块对应的一个高饱和像素点的颜色值为目标图像的各图像块分别对应的一个强彩像素点的颜色特征值;With reference to the eighth to eleventh possible implementation manners of the first aspect, in a twelfth possible implementation manner of the first aspect, when N is equal to 1, determining a high corresponding to each image block of the target image The color value of the saturated pixel is a color feature value of a strong color pixel corresponding to each image block of the target image;
当N大于1时,分别计算目标图像的各图像块对应的N个高饱和像素点的颜色值的平均值;确定目标图像的各图像块对应的N个高饱和像素点的颜色值的平均值为目标图像的各图像块分别对应的一个强彩像素点的颜色特征值。When N is greater than 1, an average value of color values of N high-saturation pixel points corresponding to each image block of the target image is respectively calculated; and an average value of color values of N high-saturation pixel points corresponding to each image block of the target image is determined. A color feature value of a strong color pixel corresponding to each image block of the target image.
本申请第二方面提供了一种图像色彩调整装置。包括缓存处理器、存储器,可选的包括通信接口。处理器连接到存储器和通信接口,例如处理器可以通过总线连接到存储器和通信接口。通信接口用于与其他设备进行通信。存储器用于存储程序代码和目录数据等。处理器用于执行上述第一方面或第一方面的任意一种可能的实现方式。A second aspect of the present application provides an image color adjustment device. It includes a cache processor, a memory, and optionally a communication interface. The processor is coupled to the memory and communication interface, for example, the processor can be coupled to the memory and communication interface via a bus. The communication interface is used to communicate with other devices. The memory is used to store program code, directory data, and the like. The processor is operative to perform any of the possible implementations of the first aspect or the first aspect described above.
本申请第三方面提供了另一种图像色彩调整装置,包括获取模块、参数调整模块和色彩调整模块,可选的还包括比较模块。上述模块用于实现第二方面中的处理器。该图像色彩调整装置通过上述模块实现上述第一方面或第一方面的任意一种可能的实现方式。A third aspect of the present application provides another image color adjustment apparatus, including an acquisition module, a parameter adjustment module, and a color adjustment module, and optionally a comparison module. The above modules are used to implement the processor in the second aspect. The image color adjustment device implements any of the above first aspect or the first aspect of the first aspect through the above module.
第四方面,本申请提供了一种计算机程序产品,计算机程序产品包括:计算机程序代码,当计算机程序代码在计算机上运行时,使得计算机执行上述第一方面中任意可能的实现方式中的方法。In a fourth aspect, the present application provides a computer program product comprising: computer program code for causing a computer to perform the method of any of the possible implementations of the first aspect described above when the computer program code is run on a computer.
第五方面,本申请提供了一种计算机可读介质,计算机可读介质存储有程序代码,当 计算机程序代码在计算机上运行时,使得计算机执行上述第一方面的实现方式中的方法。In a fifth aspect, the present application provides a computer readable medium storing program code for causing a computer to perform the method of the implementation of the first aspect described above when the computer program code is run on a computer.
附图说明DRAWINGS
为了更清楚地说明本申请实施例或背景技术中的技术方案,下面将对本申请实施例或背景技术中所需要使用的附图进行说明。In order to more clearly illustrate the technical solutions in the embodiments of the present application or the background art, the drawings to be used in the embodiments of the present application or the background art will be described below.
图1是本申请实施例提供的一种图像色彩调整系统的结构示意图;1 is a schematic structural diagram of an image color adjustment system according to an embodiment of the present application;
图2是本申请实施例提供的一种图像色彩调整方法的流程示意图;2 is a schematic flow chart of an image color adjustment method provided by an embodiment of the present application;
图3是本申请实施例提供的另一种图像色彩调整方法的流程示意图;3 is a schematic flow chart of another image color adjustment method provided by an embodiment of the present application;
图4a是本申请实施例提供的一种强彩像素点特征饱和度直方图示例;4a is an example of a strong color pixel point feature saturation histogram provided by an embodiment of the present application;
图4b是本申请实施例提供的另一种强彩像素点特征饱和度直方图示例;FIG. 4b is another example of a strong color pixel dot feature saturation histogram provided by an embodiment of the present application; FIG.
图5是本申请实施例提供的一种图像色彩调整装置的结构示意图;FIG. 5 is a schematic structural diagram of an image color adjustment apparatus according to an embodiment of the present application;
图6是本申请实施例提供的另一种图像色彩调整装置的结构示意图。FIG. 6 is a schematic structural diagram of another image color adjustment apparatus according to an embodiment of the present application.
具体实施方式Detailed ways
下面结合本申请实施例中的附图对本申请实施例进行描述。The embodiments of the present application are described below in conjunction with the accompanying drawings in the embodiments of the present application.
请参见图1,图1是本申请实施例提供的一种图像色彩调整系统的结构示意图,例如,该系统可以为影像讯号处理器(Image signal processor,ISP)。该图像色彩调整系统包括自动白平衡AWB模块101以及色彩调整模块102,其中色彩调整模块具体可以包括色彩校正模块(Color correction,CC)1021、色彩增强模块(Color enhancement,CE)1022和三维查找表模块(3D lookup table,3DLut)1023中的至少一个。在本申请实施例中,输入图像首先经过自动白平衡AWB模块101的校正,根据经过自动白平衡AWB模块101校正后的图像的各像素点的饱和度、亮度以及色相参数,确定能够代表该校正后的图像的颜色特征的强彩像素点的颜色特征值,即形成强彩图,根据强彩图对色彩调整模块102的色彩参数进行调整,然后将经过自动白平衡AWB模块101校正后的图像输入到调整好的色彩调整模块102进行色彩调整,从而得到色彩效果良好的输出图像。当色彩调整模块102中包括色彩校正CC模块1021、色彩增强CE模块1022和三维查找表3DLut模块1023时,经过自动白平衡AWB模块101校正后的图像需按照顺序依次经过色彩校正CC模块1021、色彩增强CE模块1022和三维查找表3DLut模块1023的调整。需要说明的是,在经过三维查找表3DLut模块1023调整之前,可以先经过亮度对准Gamma模块1024。Please refer to FIG. 1. FIG. 1 is a schematic structural diagram of an image color adjustment system according to an embodiment of the present application. For example, the system may be an image signal processor (ISP). The image color adjustment system includes an automatic white balance AWB module 101 and a color adjustment module 102. The color adjustment module may specifically include a color correction (CC) 1021, a color enhancement module (CE) 1022, and a three-dimensional lookup table. At least one of a module (3D lookup table, 3DLut) 1023. In the embodiment of the present application, the input image is first corrected by the automatic white balance AWB module 101, and according to the saturation, brightness, and hue parameters of each pixel of the image corrected by the automatic white balance AWB module 101, it is determined that the correction can be represented. The color feature value of the strong color pixel of the color feature of the image is formed, that is, a strong color map is formed, the color parameter of the color adjustment module 102 is adjusted according to the strong color map, and then the image corrected by the automatic white balance AWB module 101 is formed. The color adjustment module 102 is input to the adjusted color adjustment module to obtain an output image with good color effect. When the color adjustment module 102 includes the color correction CC module 1021, the color enhancement CE module 1022, and the three-dimensional lookup table 3DLut module 1023, the image corrected by the automatic white balance AWB module 101 is sequentially subjected to the color correction CC module 1021 in order. The adjustment of the enhanced CE module 1022 and the three-dimensional lookup table 3DLut module 1023. It should be noted that the Gamma module 1024 may be aligned through the brightness before being adjusted by the 3D lookup table 3DLut module 1023.
请参见图2,图2是本申请实施例提供的一种图像色彩调整方法的流程示意图,该方法包括但不限于如下步骤:Referring to FIG. 2, FIG. 2 is a schematic flowchart diagram of an image color adjustment method according to an embodiment of the present application, where the method includes but is not limited to the following steps:
S201,针对目标图像的每个图像块获取一个强彩像素点的颜色特征值。S201. Acquire a color feature value of a strong color pixel for each image block of the target image.
目标图像为经过自动白平衡校正后的图像,自动白平衡AWB模块可以计算出拍照环境下的光源颜色与色温,以修正图像色偏,使原本场景中白色对象在图像中显现白色。也就是说,未经处理的原始图像经过自动白平衡AWB模块的处理之后的图像即为目标图像。The target image is an image after automatic white balance correction. The automatic white balance AWB module can calculate the color and color temperature of the light source in the photographing environment to correct the image color shift, so that the white object in the original scene appears white in the image. That is to say, the image after the unprocessed original image is processed by the automatic white balance AWB module is the target image.
目标图像是由多个图像块中的多个像素点组成的,每个像素点存在对应的颜色值,基于目标图像的每个图像块中的多个像素点对应的颜色值,图像色彩调整装置可以获取每个 图像块对应的一个强彩像素点的颜色值,一个图像块对应的强彩像素点是可以表征这个图像块的色彩特性的像素点。例如,目标图像有A*B个图像块,那么就对应有A*B个强彩像素点,这A*B个强彩像素点组成的图像可以称为“强彩图”,强彩图可以充分代表目标图像未经过颜色校正处理之前的色彩特性。也就是说,图像色彩调整装置从目标图像这个包括很多像素点的“大图像”中,提取出包括多个强彩像素点的能够反映目标图像的色彩特性的“小图像”。The target image is composed of a plurality of pixel points in the plurality of image blocks, each pixel point has a corresponding color value, and the image color adjusting device is based on the color value corresponding to the plurality of pixel points in each image block of the target image. A color value of a strong color pixel corresponding to each image block may be obtained, and a strong color pixel corresponding to one image block is a pixel point that can represent the color characteristic of the image block. For example, if the target image has A*B image blocks, then there are A*B strong color pixels, and the image composed of A*B strong color pixels can be called “strong color map”, and the strong color map can be Fully represents the color characteristics of the target image before it has been subjected to color correction processing. That is to say, the image color adjusting means extracts a "small image" including a plurality of strong color pixel points capable of reflecting the color characteristics of the target image from the target image, which is a "large image" including a plurality of pixel points.
在一种可能的实现方式中,S201具体可以包括S2011-S2013:In a possible implementation manner, S201 may specifically include S2011-S2013:
S2011,获取目标图像的各图像块分别对应的像素点中亮度高于第一亮度阈值的至少一个目标像素点。S2011: Acquire at least one target pixel point in which a brightness of each pixel block corresponding to each image block of the target image is higher than a first brightness threshold.
根据像素点的颜色值可以得到各像素点分别对应的亮度、饱和度以及色相。例如,颜色值可以是RGB颜色空间的RGB参数,将RGB颜色空间的RGB参数转换成HSL(或HSV)颜色空间的HSL(或HSV)参数。这里R、G和B分别代表了红、绿、蓝三原色光在每个像素点中所占的数值,H、S和L(或V)分别代表了色相、饱和度、亮度三个参数的数值。According to the color value of the pixel, the brightness, saturation, and hue corresponding to each pixel point can be obtained. For example, the color value can be an RGB parameter of the RGB color space that converts the RGB parameters of the RGB color space into HSL (or HSV) parameters of the HSL (or HSV) color space. Here, R, G, and B represent the values of the red, green, and blue primary colors in each pixel. H, S, and L (or V) represent the values of the three parameters of hue, saturation, and brightness, respectively. .
本申请实施例中,筛选亮度高于第一亮度阈值的像素点,是为了过滤亮度太低的像素点。因为亮度过低的像素点对于肉眼实际是不可见的,如果由于这类像素点的饱和度而影响图像色彩的调整,可能会导致整个图像色彩出现偏差。In the embodiment of the present application, the pixel point whose brightness is higher than the first brightness threshold is filtered to filter the pixel point whose brightness is too low. Because the pixels whose brightness is too low are actually invisible to the naked eye, if the adjustment of the color of the image is affected due to the saturation of such pixel points, the color of the entire image may be deviated.
可选的,在一种可能的实施场景中,目标像素点除了需要满足亮度高于第一亮度阈值以外,还需要满足色相符合第一色相范围的条件,即S2011可以进一步为:获取目标图像的各图像块中色相符合第一色相范围和亮度高于第一亮度阈值的至少一个目标像素点。在一种设计中,第一色相范围可以是预先设定的,例如,用户喜欢针对图像中红色的部分进行色彩调整,那么可以预设第一色相范围为红色对应的色相范围,从而从目标图像中筛选出色相符合红色对应的色相范围的目标像素点。在另一种设计中,第一色相范围可以是根据目标图像对应的场景确定的。则可以先获取目标图像对应的场景信息,然后根据场景信息,确定场景信息对应的待调整的第一色相范围。例如,可以通过场景识别,确定目标图像对应的场景信息为蓝天场景,那么第一色相范围就可以为蓝色对应的色相范围,从而从目标图像中筛选出色相符合蓝色对应的色相范围的目标像素点。Optionally, in a possible implementation scenario, the target pixel needs to satisfy the condition that the hue conforms to the first hue range in addition to the brightness being higher than the first brightness threshold, that is, S2011 may further be: acquiring the target image. The hue in each image block conforms to the first hue range and at least one target pixel whose brightness is higher than the first brightness threshold. In one design, the first hue range may be preset. For example, if the user prefers to perform color adjustment for the red portion of the image, then the first hue range may be preset to a red corresponding hue range, thereby obtaining the target image. The target pixel points that match the hue range corresponding to the red color are selected. In another design, the first hue range may be determined according to a scene corresponding to the target image. Then, the scenario information corresponding to the target image may be acquired first, and then the first hue range to be adjusted corresponding to the scenario information is determined according to the scenario information. For example, the scene information corresponding to the target image may be determined by the scene recognition as a blue sky scene, and the first hue range may be a hue range corresponding to the blue color, so that the target image is matched with the target corresponding to the hue range corresponding to the blue color. pixel.
S2012,从至少一个目标像素点中确定出N个高饱和像素点。S2012, determining N high-saturation pixel points from at least one target pixel.
N个高饱和像素点为至少一个目标像素点中参考饱和度从高到低排序后排名前N个的目标像素点,N为大于等于1的正整数。在一种设计中,参考饱和度可以为饱和度。也就是说,对目标图像的每个图像块包含的至少一个目标像素点对应的饱和度进行排序,获取饱和度排名前N个的目标像素点作为N个高饱和像素点。在另一种设计中,参考饱和度也可以为饱和度与亮度共同确定的综合值,例如,可以用以下公式确定像素点对应的综合值:The N high-saturation pixel points are the top N target pixel points after the reference saturation is sorted from high to low in at least one target pixel, and N is a positive integer greater than or equal to 1. In one design, the reference saturation can be saturation. That is to say, the saturation corresponding to at least one target pixel point included in each image block of the target image is sorted, and the top N target pixel points of the saturation ranking are obtained as N high-saturation pixel points. In another design, the reference saturation may also be a composite value determined by the sum of saturation and brightness. For example, the following formula may be used to determine the integrated value corresponding to the pixel:
综合值=a*S+b*LComprehensive value = a*S+b*L
其中,S为该像素点的饱和度,L为该像素点的亮度,a为饱和度的权重值,b为亮度的权重值。需要说明的是,a通常远大于b。从而,对目标图像的每个图像块包含的至少一个目标像素点对应的综合值进行排序,获取综合值排名前N个的目标像素点作为N个高饱和像素点。如果存在饱和度相同的目标像素点时,该设计可以选择出亮度更大的目标像素点作 为高饱和像素点。Where S is the saturation of the pixel, L is the brightness of the pixel, a is the weight of the saturation, and b is the weight of the brightness. It should be noted that a is usually much larger than b. Thereby, the integrated values corresponding to the at least one target pixel point included in each image block of the target image are sorted, and the top N target pixel points of the integrated value are obtained as N high saturated pixel points. If there is a target pixel with the same saturation, the design can select a target pixel with a higher brightness as the high saturation pixel.
例如,某个目标图像块中多个目标像素点对应的参考饱和度排名见表1。假设N为1,那么目标像素点1就是高饱和像素点;假设N为2,那么目标像素点1和目标像素点2就是2个高饱和像素点。For example, the reference saturation ranking corresponding to multiple target pixel points in a target image block is shown in Table 1. Assuming N is 1, then target pixel 1 is a highly saturated pixel; assuming N is 2, then target pixel 1 and target pixel 2 are 2 highly saturated pixels.
目标像素点Target pixel 特征饱和度Characteristic saturation 颜色值Color value
目标像素点1Target pixel 1 6565 (R1,G1,B1)(R1, G1, B1)
目标像素点2 Target pixel 2 6363 (R2,G2,B2)(R2, G2, B2)
目标像素点3Target pixel 3 5959 (R3,G3,B3)(R3, G3, B3)
……...... ……...... ……......
表1:目标图像块中至少一个目标像素点对应的参考饱和度排名表(示例)Table 1: Reference saturation ranking table corresponding to at least one target pixel in the target image block (example)
S2013,根据目标图像的各图像块中N个高饱和像素点的颜色值,确定目标图像的各图像块分别对应的一个强彩像素点的颜色特征值。S2013: Determine, according to color values of N high-saturation pixel points in each image block of the target image, color feature values of one strong color pixel corresponding to each image block of the target image.
当N等于1时,每个图像块仅对应一个高饱和像素点,则确定目标图像的各图像块对应的高饱和像素点的颜色值为目标图像的各图像块分别对应的强彩像素点的颜色特征值。当N大于1时,每个图像块对应的高饱和像素点有N个,则可以分别计算目标图像的各图像块对应的N个高饱和像素点的颜色值的平均值,确定目标图像的各图像块对应的N个高饱和像素点的颜色值的平均值为目标图像的各图像块分别对应的强彩像素点的颜色特征值。When N is equal to 1, each image block corresponds to only one high-saturation pixel, and then the color value of the high-saturation pixel corresponding to each image block of the target image is determined to be a strong color pixel corresponding to each image block of the target image. Color feature value. When N is greater than 1, each image block has N high-saturation pixel points, and the average value of the color values of the N high-saturation pixel points corresponding to each image block of the target image may be respectively calculated, and each target image is determined. The average value of the color values of the N highly saturated pixels corresponding to the image block is the color feature value of the strong color pixel corresponding to each image block of the target image.
以表1为例,当N为1时,高饱和像素点的颜色值就是强彩像素点的颜色特征值,即参考饱和度排名第一的目标像素点1对应的颜色值(R1,G1,B1);当N为2时,强彩像素点的颜色特征值就是2个高饱和像素点(目标像素点1和目标像素点2)的颜色值的平均值,即(R1+R2)/2,(G1+G2)/2,(B1+B2)/2。Taking Table 1 as an example, when N is 1, the color value of the highly saturated pixel is the color feature value of the strong color pixel, that is, the color value corresponding to the target pixel point 1 of the first reference saturation (R1, G1, B1); When N is 2, the color eigenvalue of the strong color pixel is the average of the color values of the two highly saturated pixels (target pixel 1 and target pixel 2), ie (R1+R2)/2 , (G1+G2)/2, (B1+B2)/2.
S202,根据目标图像的各图像块分别对应的强彩像素点的颜色特征值调整色彩参数。S202. Adjust a color parameter according to a color feature value of a strong color pixel corresponding to each image block of the target image.
色彩参数是用于对图像色彩进行调整的参数。根据各强彩像素点的颜色特征值,图像色彩调整装置可以确定各强彩像素点的特征饱和度,当各强彩像素点的特征饱和度较大时,说明目标图像的色彩已经比较强烈,则可以降低色彩参数,避免图像过饱和。本申请实施例中调整色彩参数可以包括降低色彩参数。进一步地,色彩参数可以包括色彩校正参数、色彩增强参数或色调调整参数,色彩参数还可以包括色彩校正参数、色彩增强参数和色调调整参数。其中,色彩校正参数用于对图像色彩进行校正,色彩增强参数用于对图像色彩进行增强,色调调整参数用于对图像色调进行改变。一种可能的实现方式中,图像色彩调整装置调整的色彩参数可以是色彩调整模块的色彩参数。其中,色彩调整模块可以是色彩校正模块、色彩增强模块和三维查找表模块中的任意一个或两个,也可以包括色彩校正模块、色彩增强模块和三维查找表模块。针对不同的模块设计的色彩参数的调整方法具体可以参考下文的分情况描述。The color parameter is a parameter used to adjust the color of the image. According to the color feature values of the strong color pixels, the image color adjusting device can determine the feature saturation of each strong color pixel point. When the feature saturation of each strong color pixel point is large, the color of the target image is relatively strong. You can reduce the color parameters to avoid oversaturation of the image. Adjusting the color parameters in the embodiments of the present application may include reducing the color parameters. Further, the color parameter may include a color correction parameter, a color enhancement parameter, or a tone adjustment parameter, and the color parameter may further include a color correction parameter, a color enhancement parameter, and a tone adjustment parameter. Among them, the color correction parameter is used to correct the image color, the color enhancement parameter is used to enhance the image color, and the tone adjustment parameter is used to change the image color tone. In a possible implementation manner, the color parameter adjusted by the image color adjustment device may be a color parameter of the color adjustment module. The color adjustment module may be any one or two of a color correction module, a color enhancement module, and a three-dimensional lookup table module, and may also include a color correction module, a color enhancement module, and a three-dimensional lookup table module. The method for adjusting the color parameters of different module designs can be specifically referred to the following description.
采用该方法,可以从包含大量像素点的目标图像中提取出最能反映其图像色彩特征的少量强彩像素点,基于强彩像素点对色彩参数进行调整。首先,由于像素点数量的减少,可以极大的减少运算的工作量;同时,因为强彩像素点能够反映目标图像的色彩特征,因此也能够保证图像色彩调整的精准度和适应性。因此,该方法可以使图像色彩调整的效果 更好,且提高图像色彩调整的效率。By adopting the method, a small number of strong color pixels which best reflect the color characteristics of the image can be extracted from the target image containing a large number of pixel points, and the color parameters are adjusted based on the strong color pixel points. First of all, due to the reduction of the number of pixels, the workload of the calculation can be greatly reduced. At the same time, since the strong color pixels can reflect the color characteristics of the target image, the accuracy and adaptability of the image color adjustment can be ensured. Therefore, the method can make the effect of image color adjustment better and improve the efficiency of image color adjustment.
在一种可能的设计中,S202具体可以为:In one possible design, S202 may specifically be:
根据目标图像的各图像块分别对应的强彩像素点的颜色特征值,确定各图像块分别对应的强彩像素点的特征饱和度;根据目标图像的各图像块分别对应的强彩像素点的特征饱和度,对色彩参数进行调整,使得所述目标图像的各图像块分别对应的强彩像素点经调整后的色彩参数进行色彩调整之后,目标图像的各图像块分别对应的强彩像素点的特征饱和度不过饱和。Determining a feature saturation of a strong color pixel corresponding to each image block according to a color feature value of each of the image blocks corresponding to each image block of the target image; and correspondingly selecting a strong color pixel point according to each image block of the target image Feature saturation, the color parameter is adjusted, so that each color block corresponding to each image block of the target image is color-adjusted by the adjusted color parameter, and each image block of the target image corresponds to a strong color pixel The characteristic saturation is not saturated.
在该种设计的第一种可能的实施场景中,色彩参数可以指色彩校正参数、色彩增强参数和色调调整参数中的任一个参数。相应地,在该种设计的第一种可能的实施方式中,色彩调整模块可以是内部包括多个小的调整模块的黑匣子,色彩参数则与整个色彩调整模块对应。即色彩调整模块整体对应一个色彩参数。在该实施场景中,色彩调整模块可以是色彩校正模块、色彩增强模块和三维查找表模块中的任意一个,相应的,色彩参数可以为色彩校正模块、色彩增强模块和三维查找表模块分别对应的色彩校正参数、色彩参数以及色调调整参数中的任一种。例如,色彩调整模块为色彩校正模块,则调整色彩校正模块对应的色彩校正参数,直到经调整后的色彩参数的色彩调整后,目标图像的各图像块分别对应的强彩像素点的特征饱和度不过饱和。In a first possible implementation scenario of such a design, the color parameter may refer to any one of a color correction parameter, a color enhancement parameter, and a tone adjustment parameter. Correspondingly, in a first possible implementation of the design, the color adjustment module may be a black box internally including a plurality of small adjustment modules, and the color parameters correspond to the entire color adjustment module. That is, the color adjustment module corresponds to a color parameter as a whole. In this implementation scenario, the color adjustment module may be any one of a color correction module, a color enhancement module, and a three-dimensional lookup table module. Correspondingly, the color parameter may be respectively corresponding to the color correction module, the color enhancement module, and the three-dimensional lookup table module. Any of color correction parameters, color parameters, and tone adjustment parameters. For example, if the color adjustment module is a color correction module, the color correction parameter corresponding to the color correction module is adjusted until the color saturation of the adjusted color parameter, and the characteristic saturation of the strong color pixel corresponding to each image block of the target image respectively. But saturated.
在该第一种可能的实施场景中,首先,图像色彩调整装置可以按照预设的色彩参数,对各强彩像素点的色彩进行调整,获取输出的色彩调整后的各强彩像素点的特征饱和度;根据各图像块分别对应的强彩像素点的特征饱和度,对色彩参数进行调整;然后,按照调整后的色彩参数,再对上次输出的色彩调整后的各强彩像素点进行色彩调整,获取输出的色彩调整后的各强彩像素点对应的特征饱和度,以此类推,对色彩参数进行循环调整,直到经调整后的色彩参数的色彩调整后,目标图像的各图像块分别对应的强彩像素点的特征饱和度不过饱和,说明针对目标图像对应的色彩参数调整的调整完成,可以按照调整后的色彩参数对目标图像进行色彩调整。In the first possible implementation scenario, first, the image color adjusting device may adjust the color of each strong color pixel according to the preset color parameter, and obtain the characteristics of the output color adjusted color pixels. Saturation; adjust the color parameters according to the characteristic saturation of the strong color pixels corresponding to each image block; then, according to the adjusted color parameters, perform the color-adjusted color pixels after the last output Color adjustment, obtain the characteristic saturation of each color pixel point after the color adjustment of the output, and so on, cyclically adjust the color parameter until the color of the adjusted color parameter is adjusted, and each image block of the target image The characteristic saturation of the corresponding strong color pixel points is not saturated, indicating that the adjustment of the color parameter adjustment corresponding to the target image is completed, and the target image may be color-adjusted according to the adjusted color parameter.
同理地,在基于色彩调整模块实现的方式中,图像色彩调整装置可以将各强彩像素点输入色彩调整模块,获取输出的按照预设的色彩参数色彩调整后的各强彩像素点的特征饱和度;根据色彩调整后的各强彩像素点的特征饱和度,对色彩调整模块的色彩参数进行调整;然后,再将上次输出的色彩调整后的各强彩像素点输入经色彩参数调整后的色彩调整模块,获取输出的色彩调整后的各强彩像素点对应的特征饱和度,以此类推,对色彩调整模块的色彩参数进行循环调整,直到经调整后的色彩调整模块的色彩参数的色彩调整后,目标图像的各图像块分别对应的强彩像素点的特征饱和度不过饱和。Similarly, in the manner implemented by the color adjustment module, the image color adjustment device may input each strong color pixel into the color adjustment module to obtain the characteristics of each strong color pixel adjusted according to the preset color parameter color. Saturation; adjust the color parameters of the color adjustment module according to the characteristic saturation of each color pixel after the color adjustment; then, input the color pixels after the color output of the last output is adjusted by the color parameter After the color adjustment module, the characteristic saturation of each color pixel point after the color adjustment of the output is obtained, and so on, the color parameter of the color adjustment module is cyclically adjusted until the color parameter of the adjusted color adjustment module After the color adjustment, the characteristic saturation of the corresponding strong color pixel points of each image block of the target image is not saturated.
在该种设计的第二种可能的实施场景中,色彩调整模块包括色彩校正模块、色彩增强模块和三维查找表模块,色彩参数可以包括色彩校正参数、色彩增强参数和色调调整参数。即图像色彩调整装置需要调整色彩校正模块对应的色彩参数、色彩增强模块对应的色彩参数以及三维查找表模块对应的色彩参数。In a second possible implementation scenario of the design, the color adjustment module includes a color correction module, a color enhancement module, and a three-dimensional lookup table module, and the color parameters may include color correction parameters, color enhancement parameters, and tone adjustment parameters. That is, the image color adjustment device needs to adjust the color parameter corresponding to the color correction module, the color parameter corresponding to the color enhancement module, and the color parameter corresponding to the three-dimensional lookup table module.
在该第二种可能的实施场景中,图像色彩调整装置依次对色彩校正参数、色彩增强参数和色调调整参数进行调整。首先,图像色彩调整装置根据目标图像的各图像块分别对应的强彩像素点的特征饱和度,对色彩校正参数进行调整,使得目标图像的各图像块分别对 应的强彩像素点经调整后的色彩校正参数的色彩校正后,目标图像的各图像块分别对应的强彩像素点的特征饱和度不过饱和;然后,根据经调整后的色彩校正参数的色彩校正后的各强彩像素点的特征饱和度,对色彩增强参数进行调整,使得经调整后的色彩校正参数的色彩校正后的各强彩像素点经调整后的色彩增强参数的色彩增强后,目标图像的各图像块分别对应的强彩像素点的特征饱和度不过饱和;最后,根据经调整后的色彩增强参数的色彩增强后的各强彩像素点的特征饱和度,对色调调整参数进行调整,使得经调整后的色彩增强参数的色彩增强后的各强彩像素点经调整后的色调调整参数的色调调整后,目标图像的各图像块分别对应的强彩像素点的特征饱和度不过饱和。In the second possible implementation scenario, the image color adjustment device sequentially adjusts the color correction parameter, the color enhancement parameter, and the tone adjustment parameter. First, the image color adjustment device adjusts the color correction parameters according to the feature saturation of the strong color pixel points corresponding to the image blocks of the target image, so that the respective color image pixels corresponding to the image blocks of the target image are adjusted. After the color correction of the color correction parameter, the characteristic saturation of the corresponding strong color pixel points of each image block of the target image is not saturated; then, the characteristics of each strong color pixel point after the color correction according to the adjusted color correction parameter Saturation, the color enhancement parameter is adjusted, so that after the color correction of the color correction parameters of the adjusted color correction parameter is adjusted, the color of the adjusted color enhancement parameter is enhanced, and each image block of the target image is correspondingly strong. The characteristic saturation of the color pixel is not saturated; finally, the tone adjustment parameter is adjusted according to the characteristic saturation of each color pixel after the color enhancement parameter of the adjusted color enhancement parameter, so that the adjusted color enhancement parameter is adjusted. After the color enhancement of each color pixel is adjusted, the tone adjustment parameter is adjusted after the tone adjustment The characteristic saturation of the strong color pixel points corresponding to the respective image blocks of the target image is not saturated.
同理地,在基于色彩调整模块实现的方式中,色彩校正模块、色彩增强模块和三维查找表模块分别对应的色彩校正参数、色彩增强参数以及色调调整参数进行调整。Similarly, in the manner implemented by the color adjustment module, the color correction module, the color enhancement module, and the three-dimensional lookup table module respectively adjust color correction parameters, color enhancement parameters, and tone adjustment parameters.
在该种设计的第三种可能的实施场景中,色彩调整模块可以是色彩校正模块、色彩增强模块和三维查找表模块中的任意两个,相应的,色彩参数可以包括色彩校正参数、色彩增强参数和色调调整参数中的任两种。具体的调整方法可以参考上述该设计的第二种可能的实施场景的实施方法,即依次对色彩校正参数、色彩增强参数和色调调整参数中的任意两个参数进行调整,直到输出的经调整后的色彩参数的色彩调整后,目标图像的各图像块分别对应的强彩像素点的特征饱和度不过饱和。同理地,可以对色彩校正模块、色彩增强模块和三维查找表模块中的任意两个模块对应的色彩参数进行调整。In a third possible implementation scenario of the design, the color adjustment module may be any two of a color correction module, a color enhancement module, and a three-dimensional lookup table module. Accordingly, the color parameters may include color correction parameters, color enhancements. Any of the parameters and tone adjustment parameters. For a specific adjustment method, reference may be made to the implementation method of the second possible implementation scenario of the foregoing design, that is, sequentially adjusting any two parameters of the color correction parameter, the color enhancement parameter, and the tone adjustment parameter until the output is adjusted. After the color adjustment of the color parameter, the characteristic saturation of the corresponding strong color pixel points of each image block of the target image is not saturated. Similarly, the color parameters corresponding to any two of the color correction module, the color enhancement module, and the three-dimensional lookup table module can be adjusted.
在该设计的第一种可能的实现方式中,图像色彩调整装置根据目标图像的各图像块分别对应的强彩像素点的特征饱和度,对色彩参数进行调整;获取经调整后的色彩参数的色彩调整后的各强彩像素点中,对应的特征饱和度高于第一饱和度阈值的强彩像素点的第一像素点数量;当第一像素数点量大于或等于第一数量阈值时,降低色彩参数,直到第一像素点数量小于第一数量阈值。In a first possible implementation manner of the design, the image color adjusting device adjusts the color parameter according to the feature saturation of the strong color pixel corresponding to each image block of the target image; and obtains the adjusted color parameter. In the color-adjusted color pixels, the corresponding feature saturation is higher than the first pixel threshold of the first saturation threshold; when the first pixel number is greater than or equal to the first threshold , reducing the color parameter until the number of first pixels is less than the first number threshold.
在第一种可能的实现方式中,图像色彩调整装置对S201中得到的各强彩像素点(即强彩图)进行色彩调整,然后根据色彩调整后的各强彩像素点的颜色特征值,确定色彩调整后的各强彩像素点对应的特征饱和度。根据各强彩像素点的特征饱和度,获取特征饱和度高于第一饱和度阈值的强彩像素点的第一像素点数量。其中,第一饱和度阈值可以是预先设定的用于衡量特征饱和度是否过高的阈值。相当于,获取各强彩像素点对应的特征饱和度中特征饱和度过高的这些强彩像素点的数量作为第一像素点数量。当第一像素数点数量大于或等于第一数量阈值时,可以认为强彩图中特征饱和度过高的强彩像素点过多,因此可以降低色彩参数。其中,第一数量阈值可以是设定的一个固定的数值;第一数量阈值也可以是根据预设的百分比和目标图像的图像块数量的乘积确定的,如目标图像有900块图像块,预设的百分比为10%,则第一数量阈值即为90。进一步的,可以将色彩参数降低到预设的色彩参数值,也可以色彩参数按照预设的规则下调一定的数值,这里不作限定。对色彩参数进行调整之后,再对色彩调整后的各强彩像素点进行色彩调整,再对特征饱和度高于第一饱和度阈值的强彩像素点的第一像素点数量是否大于或等于第一数量阈值进行判断,如此循环,直到第一像素点数量小于第一数量阈值,结束循环。In a first possible implementation manner, the image color adjusting device performs color adjustment on each of the strong color pixel points (ie, the strong color image) obtained in S201, and then, according to the color characteristic values of the color pixels after the color adjustment, The characteristic saturation corresponding to each color pixel point after the color adjustment is determined. Obtaining, according to the characteristic saturation of each strong color pixel, the number of first pixels of the strong color pixel whose feature saturation is higher than the first saturation threshold. The first saturation threshold may be a preset threshold for measuring whether the feature saturation is too high. Correspondingly, the number of the strong color pixel points whose feature saturation is too high in the feature saturation corresponding to each strong color pixel point is obtained as the first pixel point number. When the number of the first pixel number is greater than or equal to the first number threshold, it can be considered that there are too many strong color pixels in the strong color map whose feature saturation is too high, so the color parameter can be lowered. The first quantity threshold may be a fixed value set; the first quantity threshold may also be determined according to a product of a preset percentage and a number of image blocks of the target image, such as a target image having 900 image blocks, If the percentage is set to 10%, the first number threshold is 90. Further, the color parameter may be reduced to a preset color parameter value, or the color parameter may be adjusted according to a preset rule by a certain value, which is not limited herein. After adjusting the color parameters, color adjustment is performed on each color pixel point after the color adjustment, and whether the number of the first pixel points of the strong color pixel with the feature saturation higher than the first saturation threshold is greater than or equal to the first A number threshold is determined, and the loop is repeated until the number of first pixels is less than the first number threshold.
可选的,图像色彩调整装置可以划分多个饱和度范围,然后对落在各个饱和度范围的强彩像素点的特征饱和度的数量进行直方图统计,从而更加直观的得到特征饱和度高于第 一饱和度阈值的强彩像素点的第一像素点数量。例如,图4a所示的强彩像素点特征饱和度直方图中,将数值范围为0~100的特征饱和度S划分了100个饱和度范围,分别是0≤S<1,1≤S<2……99≤S<100,其中,直方图的横坐标即为饱和度范围,纵坐标即为强彩像素点的数量。统计特征饱和度统计落在各个饱和度范围的强彩像素点的数量,即可形成图4a所示的强彩像素点特征饱和度直方图。假设第一数量阈值为50,第一饱和度阈值为98,则利用强彩像素点特征饱和度直方图,可以确定当前的强彩图中,98≤S<99以及99≤S<100这两个饱和度范围对应的强彩像素点的数量为65(40+25),即第一像素点数量为65。Optionally, the image color adjusting device may divide the plurality of saturation ranges, and then perform histogram statistics on the number of feature saturations of the strong color pixels falling in the respective saturation ranges, thereby more intuitively obtaining the feature saturation is higher than The number of first pixels of the strong color pixel of the first saturation threshold. For example, in the strong saturation pixel histogram saturation histogram shown in FIG. 4a, the feature saturation S with a value range of 0 to 100 is divided into 100 saturation ranges, which are 0 ≤ S < 1, 1 ≤ S < 2...99≤S<100, wherein the abscissa of the histogram is the saturation range, and the ordinate is the number of strong color pixels. The statistical feature saturation statistics fall on the number of strong color pixels in each saturation range, which can form the strong saturation pixel point feature saturation histogram shown in Fig. 4a. Assuming that the first quantity threshold is 50 and the first saturation threshold is 98, using the strong color pixel point feature saturation histogram, it can be determined that the current strong color picture has 98 ≤ S < 99 and 99 ≤ S < 100. The number of strong color pixels corresponding to the saturation range is 65 (40+25), that is, the number of first pixels is 65.
在该设计的第二种可能的实现方式中,图像色彩调整装置根据目标图像的各图像块分别对应的强彩像素点的特征饱和度,对色彩参数进行调整;获取经调整后的色彩参数的色彩调整后的各强彩像素点中,对应的特征饱和度分别处于M个高饱和度范围的强彩像素点的像素点数量;M个高饱和度范围为预设的多个饱和度范围从高到低排序后排名前M个的饱和度范围,M为大于1的正整数;当M个高饱和度范围中至少一个目标高饱和度范围对应的像素点数量大于或等于目标高饱和度范围对应的第二数量阈值时,降低色彩调整模块的色彩参数,直到M个高饱和度范围分别对应的像素点数量均小于M个高饱和度范围对应的第二数量阈值。In a second possible implementation manner of the design, the image color adjusting device adjusts the color parameter according to the feature saturation of the strong color pixel corresponding to each image block of the target image; and obtains the adjusted color parameter. In the color-adjusted color pixels, the corresponding feature saturations are respectively in the number of pixels of the high-saturation pixel points in the M high saturation range; the M high-saturation ranges are preset in the plurality of saturation ranges from High to low ranks the top M saturation ranges, M is a positive integer greater than 1; when at least one of the M high saturation ranges corresponds to a target high saturation range, the number of pixels is greater than or equal to the target high saturation range When the corresponding second quantity threshold is used, the color parameter of the color adjustment module is decreased until the number of pixel points corresponding to the M high saturation ranges are respectively smaller than the second quantity threshold corresponding to the M high saturation ranges.
在第二种可能的实现方式中,图像色彩调整装置可以划分多个饱和度范围,将其中饱和度范围排名前M个的饱和度范围作为M个高饱和度范围。例如,有100个饱和度范围,分别是0≤S<1,1≤S<2……99≤S<100,假设M为3,那么高饱和度范围即为97≤S<98、98≤S<99以及99≤S<100这三个饱和度范围。每个高饱和度范围设定对应的第二数量阈值,例如,97≤S<98对应的第二数量阈值为35,98≤S<99对应的第二数量阈值为30,99≤S<100对应的第二数量阈值为25。In a second possible implementation manner, the image color adjustment device may divide a plurality of saturation ranges, and the saturation ranges in which the saturation ranges are ranked as the M high saturation ranges. For example, there are 100 saturation ranges, which are 0 ≤ S < 1, 1 ≤ S < 2 ... 99 ≤ S < 100. Assuming M is 3, the high saturation range is 97 ≤ S < 98, 98 ≤ Three saturation ranges of S<99 and 99≤S<100. Each high saturation range sets a corresponding second quantity threshold. For example, a second quantity threshold corresponding to 97≤S<98 is 35, and a second quantity threshold corresponding to 98≤S<99 is 30, 99≤S<100. The corresponding second number threshold is 25.
在第二种可能的实现方式中,图像色彩调整装置对S201中得到的各强彩像素点(即强彩图)进行色彩调整,然后根据色彩调整后的各强彩像素点的颜色特征值,确定色彩调整后的各强彩像素点对应的特征饱和度。根据色彩调整后的各强彩像素点的特征饱和度,获取特征饱和度分别处于M个高饱和度范围的强彩像素点的像素点数量。当M个高饱和度范围的中至少一个目标高饱和度范围对应的像素点数量大于或等于目标高饱和度范围对应的第二数量阈值时,可以认为强彩图中特征饱和度过高的强彩像素点过多,则可以降低色彩参数。其中,第二数量阈值与第一数量阈值的设定方法相似。对色彩参数进行调整之后,再将色彩调整后的各强彩像素点输入调整后的色彩调整模块进行色彩调整,再判断M个高饱和度范围的中是否至少一个目标高饱和度范围对应的像素点数量大于或等于目标高饱和度范围对应的第二数量阈值,如此循环,直到M个高饱和度范围分别对应的像素点数量均小于M个高饱和度范围对应的第二数量阈值,结束循环。In a second possible implementation manner, the image color adjusting device performs color adjustment on each of the strong color pixel points (ie, the strong color image) obtained in S201, and then, according to the color characteristic values of the color pixels after the color adjustment, The characteristic saturation corresponding to each color pixel point after the color adjustment is determined. According to the characteristic saturation of each color pixel point after the color adjustment, the number of pixel points of the strong color pixel points whose feature saturation is respectively in the M high saturation range is obtained. When the number of pixel points corresponding to at least one target high saturation range of the M high saturation ranges is greater than or equal to the second number threshold corresponding to the target high saturation range, the feature saturation in the strong color map may be considered to be too high. If there are too many color pixels, the color parameters can be lowered. Wherein, the second quantity threshold is similar to the setting method of the first quantity threshold. After adjusting the color parameters, the color-adjusted color pixels are input into the adjusted color adjustment module for color adjustment, and then it is determined whether at least one of the M high-saturation ranges corresponds to at least one target high-saturation range. The number of points is greater than or equal to the second number threshold corresponding to the target high saturation range, and the loop is repeated until the number of pixels corresponding to the M high saturation ranges is less than the second number threshold corresponding to the M high saturation ranges, and the loop ends. .
同理可选的,图像色彩调整装置也可以通过对强彩像素点特征饱和度进行直方图统计,直观的确定M个高饱和度范围对应的像素点数量。Similarly, the image color adjustment device can also intuitively determine the number of pixels corresponding to the M high saturation ranges by performing histogram statistics on the feature saturation of the strong color pixel points.
在该设计的第三种可能的实现方式中,图像色彩调整装置根据目标图像的各图像块分别对应的强彩像素点的特征饱和度,对色彩参数进行调整;获取经调整后的色彩参数的色彩调整后的各强彩像素点中,对应的特征饱和度分别处于M个高饱和度范围的强彩像素点的像素点数量以及M个高饱和度范围分别对应的权重参数;M个高饱和度范围为预设的多 个饱和度范围从高到低排序后排名前M个的饱和度范围,M为大于1的正整数;计算第二像素点数量,第二像素点数量为各高饱和度范围分别对应的像素点数量与各高饱和度范围对应的权重参数相乘后得到的数值之和;当第二像素点数量大于或等于第三数量阈值时,降低色彩参数,直到第二像素点数量小于第三数量阈值。In a third possible implementation manner of the design, the image color adjusting device adjusts the color parameter according to the feature saturation of the strong color pixel corresponding to each image block of the target image; and obtains the adjusted color parameter. In the color-adjusted color pixels, the corresponding feature saturations are respectively in the number of pixels of the strong color pixels in the M high saturation range and the weight parameters corresponding to the M high-saturation ranges respectively; M high saturation The degree range is a preset plurality of saturation ranges from high to low, and the top M saturation ranges, M is a positive integer greater than 1; the second pixel number is calculated, and the second pixel number is high saturation The sum of the number of pixels corresponding to the degree range and the weight parameter corresponding to each high saturation range; when the number of second pixels is greater than or equal to the third number threshold, the color parameter is lowered until the second pixel The number of points is less than the third number threshold.
在第三种可能的实现方式中,图像色彩调整装置可以划分多个饱和度范围,将其中饱和度范围排名前M个的饱和度范围作为M个高饱和度范围。例如,有100个饱和度范围,分别是0≤S<1,1≤S<2……99≤S<100,假设M为3,那么高饱和度范围即为97≤S<98、98≤S<99以及99≤S<100这三个饱和度范围。每个高饱和度范围设定对应的权重参数,例如,97≤S<98对应的权重参数为30%,98≤S<99对应的权重参数为30%,99≤S<100对应的权重参数为40%。其中,权重参数可以是预先设定的,且权重参数与M的数量存在对应关系,即M个高饱和度范围对应M个权重参数,且M个权重参数之后为1。In a third possible implementation manner, the image color adjustment device may divide the plurality of saturation ranges, and the saturation ranges in which the saturation ranges are ranked as the M high saturation ranges. For example, there are 100 saturation ranges, which are 0 ≤ S < 1, 1 ≤ S < 2 ... 99 ≤ S < 100. Assuming M is 3, the high saturation range is 97 ≤ S < 98, 98 ≤ Three saturation ranges of S<99 and 99≤S<100. Each high saturation range sets a corresponding weight parameter. For example, the weight parameter corresponding to 97≤S<98 is 30%, the weight parameter corresponding to 98≤S<99 is 30%, and the weight parameter corresponding to 99≤S<100. It is 40%. The weight parameter may be preset, and the weight parameter has a corresponding relationship with the number of M, that is, the M high saturation ranges correspond to the M weight parameters, and the M weight parameters are followed by 1.
图像色彩调整装置对S201中得到的各强彩像素点(即强彩图)进行色彩调整,然后根据色彩调整后的各强彩像素点的颜色特征值,确定色彩调整后的各强彩像素点对应的特征饱和度。根据色彩调整后的各强彩像素点对应的特征饱和度,获取特征饱和度分别处于M个高饱和度范围的强彩像素点的像素点数量以及M个高饱和度范围分别对应的权重参数。计算各高饱和度范围分别对应的像素点数量与各高饱和度范围对应的权重参数相乘后得到的数值之和,作为第二像素点数量。例如,97≤S<98对应的权重参数为30%,落在该范围的强彩像素点的像素点数量为30;98≤S<99对应的权重参数为30%,落在该范围的强彩像素点的像素点数量为40;99≤S<100对应的权重参数为40%,落在该范围的强彩像素点的像素点数量为25。则第二像素点数量即为30*30%+40*30%+25*40%=31。当第二像素点数量大于或等于第三数量阈值时,可以认为强彩图中特征饱和度过高的强彩像素点过多,则可以降低色彩参数。其中,第三数量阈值与第一数量阈值的设定方法相似。对色彩参数进行调整之后,再对色彩调整后的各强彩像素点进行色彩调整,再判断第二像素点数量是否大于或等于第三数量阈值,如此循环,直到第二像素点数量小于第三数量阈值,结束循环。The image color adjusting device performs color adjustment on each of the strong color pixel points (ie, the strong color image) obtained in S201, and then determines the color-adjusted color pixels according to the color characteristic values of the color-adjusted color pixels. Corresponding feature saturation. The number of pixel points of the strong color pixel points with the feature saturations in the M high saturation ranges and the weight parameters corresponding to the M high saturation ranges respectively are obtained according to the feature saturation corresponding to the color-adjusted color pixels. The sum of the values obtained by multiplying the number of pixels corresponding to each high saturation range by the weight parameter corresponding to each high saturation range is calculated as the number of second pixel points. For example, the weight parameter corresponding to 97≤S<98 is 30%, the number of pixels of the strong color pixel falling within the range is 30; the weight parameter corresponding to 98≤S<99 is 30%, and the weight falling in the range is strong. The number of pixels of the color pixel is 40; the weight parameter corresponding to 99 ≤ S < 100 is 40%, and the number of pixels of the strong color pixel falling within the range is 25. Then the number of second pixels is 30*30%+40*30%+25*40%=31. When the number of second pixel points is greater than or equal to the third number threshold, it can be considered that there are too many strong color pixels with high feature saturation in the strong color map, and the color parameter can be reduced. Wherein, the third quantity threshold is similar to the setting method of the first quantity threshold. After adjusting the color parameters, color adjustment is performed on each color-adjusted pixel point after color adjustment, and then it is determined whether the number of second pixel points is greater than or equal to a third number threshold, and so on, until the number of second pixels is smaller than the third The number threshold, the end of the loop.
同理可选的,图像色彩调整装置也可以通过对强彩像素点特征饱和度进行直方图统计,直观的确定高饱和度范围对应的像素点数量,从而确定第二像素点数量。Similarly, the image color adjusting device can also determine the number of pixels corresponding to the high saturation range by performing histogram statistics on the feature saturation of the strong color pixel points, thereby determining the number of second pixel points.
需要说明的是,上述该种设计的三种可能的实现方式均适用于上述提到的该种设计的三种可能的实施场景,在基于色彩调整模块实现的方式中,色彩调整模块可以包括色彩校正模块、色彩增强模块和三维查找表模块中的任意一种、两种或三种,或者色彩调整模块为一个类似黑匣子的整体的任何实施场景都可以按照上述该种设计的三种可能的实现方式对色彩调整模块的色彩参数进行循环调整。进一步的,在该种设计的第二种或第三种可能的实施场景中,针对色彩调整模块中包括的不同模块,上述三种可能的实现方式中涉及的数值M以及各个数量阈值均可以不同。It should be noted that the three possible implementations of the above-mentioned design are applicable to the three possible implementation scenarios of the above-mentioned design. In the manner implemented by the color adjustment module, the color adjustment module may include color. Any one, two or three of the correction module, the color enhancement module, and the three-dimensional look-up table module, or any implementation scenario in which the color adjustment module is a black box-like whole can follow the three possible implementations of the above design. The method adjusts the color parameters of the color adjustment module cyclically. Further, in the second or third possible implementation scenario of the design, for the different modules included in the color adjustment module, the values M and the respective thresholds involved in the above three possible implementation manners may be different. .
可选的,根据目标图像的各图像块分别对应的强彩像素点的特征饱和度,对色彩参数进行调整,使得所述目标图像的各图像块分别对应的强彩像素点经调整后的色彩参数进行色彩调整之后,所述目标图像的各图像块分别对应的强彩像素点的特征饱和度不过饱和之前,还包括:Optionally, the color parameter is adjusted according to the feature saturation of the strong color pixel corresponding to each image block of the target image, so that each image block of the target image respectively corresponds to the adjusted color of the strong color pixel. After the color adjustment of the parameter, before the characteristic saturation of the corresponding color pixel points of each image block of the target image is saturated, the method further includes:
S2021,将目标图像的各图像块分别对应的强彩像素点的特征饱和度与第一饱和度阈值 比较,确定第三像素点数量;若确定第三像素点数量大于或等于第四数量阈值,则执行S2022;若确定第三像素点数量小于第四数量阈值,则执行S202。S2021. The characteristic saturation of the strong color pixel corresponding to each image block of the target image is compared with the first saturation threshold to determine the third pixel number. If the third pixel number is determined to be greater than or equal to the fourth quantity threshold, Then, S2022 is performed; if it is determined that the number of third pixel points is less than the fourth number threshold, then S202 is performed.
第一饱和度阈值可以是预先设定的用于衡量特征饱和度是否过低的阈值。第三像素点数量为所述目标图像的各图像块分别对应的强彩像素点中对应的特征饱和度小于第一饱和度阈值的强彩像素点的数量。确定第三像素点数量并判断该数量是否大于或等于第四数量阈值。其中,第四数量阈值与第一数量阈值的设定方法相似。若确定第三像素点数量大于或等于第四数量阈值,可以说明强彩图中的大部分像素点的特征饱和度过低,可以认为目标图像是一个弱彩画面,则执行S2022,按照预设数值大幅度降低色彩参数。若确定第三像素点数量未大于或等于第四数量阈值,可以认为目标图像并不是一个弱彩画面,则执行S202,对色彩参数进行循环调整。The first saturation threshold may be a predetermined threshold for measuring whether the feature saturation is too low. The number of the third pixel points is the number of strong color pixel points in the corresponding strong color pixel points corresponding to the image blocks of the target image that are less than the first saturation threshold. A third pixel number is determined and it is determined whether the number is greater than or equal to a fourth number threshold. Wherein, the fourth quantity threshold is similar to the setting method of the first quantity threshold. If it is determined that the number of the third pixel points is greater than or equal to the fourth number threshold, it may be stated that the feature saturation of most of the pixels in the strong color image is too low, and the target image is considered to be a weak color picture, then S2022 is executed, according to the preset. The value greatly reduces the color parameters. If it is determined that the number of the third pixel points is not greater than or equal to the fourth number threshold, it may be considered that the target image is not a weak color picture, and then S202 is performed to perform cyclic adjustment on the color parameters.
可选的,这里也可以利用强彩像素点特征饱和度直方图,确定小于第一饱和度阈值的特征饱和度的数量。例如,如图4b所示的强彩像素点特征饱和度直方图,假设第四数量阈值为800,第一饱和度阈值为2,则利用强彩像素点特征饱和度直方图,可以确定当前的强彩图中,0≤S<1以及1≤S<2这两个饱和度范围对应的强彩像素点的数量为805(400+405),即目标图像的各图像块分别对应的强彩像素点的特征饱和度中小于第一饱和度阈值的特征饱和度的数量大于或等于第四数量阈值,则执行S2032。Optionally, the strong saturation pixel histogram saturation histogram may also be used herein to determine the number of feature saturations that are less than the first saturation threshold. For example, as shown in FIG. 4b, the strong color pixel point feature saturation histogram assumes that the fourth number threshold is 800 and the first saturation threshold is 2, then the current saturation map can be determined using the strong color pixel point feature saturation histogram. In the strong color map, the number of strong color pixels corresponding to the two saturation ranges of 0≤S<1 and 1≤S<2 is 805 (400+405), that is, the strong color corresponding to each image block of the target image S2032 is performed when the number of feature saturations of the feature saturation of the pixel that is less than the first saturation threshold is greater than or equal to the fourth number threshold.
S2022,按照预设数值大幅度降低色彩参数。S2022, greatly reduce the color parameters according to the preset value.
由于S2021中确定了目标图像是一个弱彩画面,那么可以将色彩调整模块的色彩参数降低到预设的与弱彩画面对应的色彩参数的值,例如可以将色彩参数降低至最低值;也可以将色彩调整模块的色彩参数按照预设的针对弱彩画面的规则下调一定的数值,这里不作限定。Since it is determined in S2021 that the target image is a weak color picture, the color parameter of the color adjustment module can be reduced to a preset value of the color parameter corresponding to the weak color picture, for example, the color parameter can be reduced to the lowest value; The color parameter of the color adjustment module is adjusted according to a preset rule for the weak color picture, and is not limited herein.
需要说明的是,与S202不同的是,S2022中的降低色彩参数是大幅度且一步到位的一种调整方式,而S202是一个不断地循环微调再判断,直到达到要求的循环调整过程。因为确定了目标图像是弱彩画面,那么就无需执行S202这样对色彩参数进行不断微调的步骤,而是直接调整到适合弱彩画面的色彩参数即可。It should be noted that, unlike S202, the color reduction parameter in S2022 is a large-scale and one-step adjustment method, and S202 is a cyclically fine-tuning and then judging until the required loop adjustment process is reached. Since it is determined that the target image is a weak color picture, it is not necessary to perform the step of continuously fine-tuning the color parameter as in S202, but directly adjust to the color parameter suitable for the weak color picture.
S203,按照调整后的色彩参数对目标图像进行色彩调整。S203: Perform color adjustment on the target image according to the adjusted color parameter.
在基于色彩调整模块实现的方式中,S203可以为按照调整后的色彩参数,通过色彩调整模块对目标图像进行色彩调整。In the manner implemented by the color adjustment module, S203 may perform color adjustment on the target image through the color adjustment module according to the adjusted color parameter.
S201-S202完成了根据目标图像的强彩图,对色彩调整模块的色彩参数的进行适应性调整的流程。之后图像色彩调整装置就可以按照调整好的色彩参数对目标图像进行色彩调整,从而避免过强的颜色增益造成色彩调整后的目标图像的过饱和。S201-S202 completes the process of adapting the color parameters of the color adjustment module according to the strong color map of the target image. After that, the image color adjusting device can adjust the color of the target image according to the adjusted color parameter, thereby avoiding excessive color gain and causing over-saturation of the target image after color adjustment.
本申请实施例中,通过获取目标图像的各图像块对应的一个强彩像素点的颜色特征值,可以从包含大量像素点的目标图像中提取出最能反映其图像色彩特征的少量强彩像素点,基于强彩像素点对色彩参数进行调整,从而输出色彩效果更好的目标图像。可以极大的减少运算的工作量,同时,也能够保证图像色彩调整的精准度和适应性,提高图像色彩调整的效率。In the embodiment of the present application, by acquiring the color feature values of a strong color pixel corresponding to each image block of the target image, a small number of strong color pixels that best reflect the color characteristics of the image may be extracted from the target image including a plurality of pixel points. Point, adjust the color parameters based on the strong color pixels to output a target image with better color effect. It can greatly reduce the workload of the calculation. At the same time, it can also ensure the accuracy and adaptability of image color adjustment and improve the efficiency of image color adjustment.
请参见图3,图3是本申请实施例提供的另一种图像色彩调整方法的流程示意图。在 本申请实施例中,色彩参数包括色彩校正参数、色彩增强参数和色调调整参数,色彩调整模块包括色彩校正模块、色彩增强模块和三维查找表模块。该方法包括但不限于如下步骤:Referring to FIG. 3, FIG. 3 is a schematic flowchart diagram of another image color adjustment method according to an embodiment of the present application. In the embodiment of the present application, the color parameter includes a color correction parameter, a color enhancement parameter, and a tone adjustment parameter, and the color adjustment module includes a color correction module, a color enhancement module, and a three-dimensional lookup table module. The method includes but is not limited to the following steps:
S301,获取目标图像对应的场景信息。S301. Acquire scene information corresponding to the target image.
在本申请实施例中,图像色彩调整装置可以获取到目标图像对应的场景信息。目标图像对应的场景信息指示了目标图像中呈现的画面的是何种场景,例如蓝天场景、绿植场景、夜晚场景或美食场景等等。可以根据目标图像拍摄的画面中的物体的颜色、形状等多种特征确定出第一画面对应的场景信息。进一步的,场景信息可以是图像色彩调整装置本身从目标图像中识别提取出的,也可以是其他装置识别提取场景信息后图像色彩调整装置从其他装置中获取的,这里不作具体限定。In the embodiment of the present application, the image color adjustment device may acquire the scene information corresponding to the target image. The scene information corresponding to the target image indicates what kind of scene is present in the target image, such as a blue sky scene, a green scene, a night scene, or a gourmet scene. The scene information corresponding to the first screen may be determined according to various characteristics such as the color, shape, and the like of the object in the image captured by the target image. Further, the scene information may be extracted from the target image by the image color adjustment device itself, or may be obtained by the other device after the other device recognizes the extracted scene information, and is not specifically limited herein.
S302,根据目标图像对应的场景信息,确定场景信息对应的待调整的第一色相范围。S302. Determine, according to the scene information corresponding to the target image, a first hue range to be adjusted corresponding to the scene information.
针对不同的场景,需要进行色彩调整的色相范围也可以是不同的。例如绿植场景时,需要调整绿色的色相范围的像素点的色彩即可,其他的像素点可以不关注。因此,可以预先设定各种场景信息与色相范围之间的对应关系,例如,可以是如表2所示的场景色相范围映射表。进而,根据获取到的目标图像对应的场景信息,图像色彩调整装置可以确定出针对目标图像待调整的第一色相范围。以表2为例,若确定出目标图像对应的场景信息为蓝天场景,那么待调整的第一色相范围即为34-53。The range of hue that requires color adjustment can also be different for different scenarios. For example, in a green scene, it is necessary to adjust the color of the pixel of the green hue range, and other pixels may not be concerned. Therefore, the correspondence between various scene information and the hue range can be set in advance, for example, it can be a scene hue range mapping table as shown in Table 2. Further, based on the scene information corresponding to the acquired target image, the image color adjustment device may determine a first hue range to be adjusted for the target image. Taking Table 2 as an example, if it is determined that the scene information corresponding to the target image is a blue sky scene, the first hue range to be adjusted is 34-53.
场景信息Scene information 色相范围Hue range
蓝天场景Blue sky scene 34-5334-53
夜晚场景Night scene 78-8978-89
绿植场景Green plant scene 45-6645-66
……...... ……......
表2:场景色相范围映射表(示例)Table 2: Scene Hue Range Mapping Table (Example)
S303,获取目标图像的各图像块分别对应的像素点中色相符合第一色相范围和亮度高于第一亮度范围的至少一个目标像素点。S303. Acquire, in each pixel block corresponding to each image block of the target image, a hue that matches a first hue range and at least one target pixel whose brightness is higher than the first brightness range.
S303的具体实现方法可以参考S2011,此处不再赘述。For the specific implementation method of S303, refer to S2011, and details are not described herein again.
需要说明的是,S303与S2011的区别在于,除了需要筛选像素点对应的亮度高于第一亮度阈值的像素点,还需要筛选色相符合第一色相范围的像素点。也就是说,过滤亮度太低的像素点的同时,也筛选出场景信息对应的待调整的第一色相范围内的像素点,使色彩调整更具有针对性。It should be noted that the difference between S303 and S2011 is that, in addition to the pixel points whose brightness corresponding to the pixel point is higher than the first brightness threshold, it is necessary to filter the pixel points whose hue conforms to the first hue range. That is to say, while filtering the pixel points whose brightness is too low, the pixel points in the first hue range to be adjusted corresponding to the scene information are also filtered out, so that the color adjustment is more targeted.
S304,从至少一个目标像素点中确定出M个高饱和像素点。S304. Determine M high-saturation pixel points from the at least one target pixel.
S305,根据目标图像的各图像块中M个高饱和像素点的颜色值,确定目标图像的各图像块分别对应的一个强彩像素点的颜色特征值。S305. Determine color feature values of one strong color pixel point corresponding to each image block of the target image according to color values of M high-saturation pixel points in each image block of the target image.
S304-S305的具体实现方法可以参考S2012-S2013,此处不再赘述。For the specific implementation of S304-S305, refer to S2012-S2013, and details are not described here.
S306,根据目标图像的各图像块分别对应的强彩像素点的颜色特征值,确定各图像块分别对应的强彩像素点的特征饱和度。S306. Determine, according to the color feature value of the strong color pixel corresponding to each image block of the target image, the feature saturation of the strong color pixel corresponding to each image block.
S307,将目标图像的各图像块分别对应的强彩像素点的特征饱和度与第一饱和度阈值 比较,确定第三像素点数量;若确定第三像素点数量大于或等于第四数量阈值,则执行S308和S311,若确定第三像素点数量小于第四数量阈值,执行S309-S312。S307: Compare a feature saturation of a strong color pixel corresponding to each image block of the target image with a first saturation threshold, and determine a third pixel number; if it is determined that the third pixel number is greater than or equal to a fourth quantity threshold, Then, S308 and S311 are performed, and if it is determined that the number of third pixel points is less than the fourth number threshold, S309-S312 is performed.
S308,按照预设数值大幅度降低色彩参数。S308, the color parameter is greatly reduced according to the preset value.
S307-S308的具体实现方法可以参考S2021-S2022,此处不再赘述。For the specific implementation method of S307-S308, refer to S2021-S2022, and details are not described herein again.
S309,根据目标图像的各图像块分别对应的强彩像素点的特征饱和度,对色彩校正参数进行调整,使得目标图像的各图像块分别对应的强彩像素点经调整后的色彩校正参数的色彩校正后,目标图像的各图像块分别对应的强彩像素点的特征饱和度不过饱和。S309, adjusting the color correction parameter according to the feature saturation of the strong color pixel corresponding to each image block of the target image, so that each image block of the target image respectively corresponds to the color correction parameter of the strong color pixel point After the color correction, the characteristic saturation of the corresponding strong color pixel points of each image block of the target image is not saturated.
图像色彩调整装置将各强彩像素点输入色彩校正模块,获取输出的色彩校正后的各强彩像素点的特征饱和度,根据色彩校正后的各强彩像素点的特征饱和度,对色彩校正模块的色彩校正参数进行调整。然后,再将上次输出的色彩校正后的各强彩像素点输入经色彩校正参数调整后的色彩校正模块,获取输出的色彩校正后的各强彩像素点的特征饱和度,以此类推,对色彩校正模块的色彩校正参数进行循环调整,直到输出的经色彩校正参数调整后的色彩校正模块的色彩校正后的各强彩像素点的特征饱和度不过饱和。The image color adjusting device inputs each strong color pixel into the color correction module to obtain the characteristic saturation of the output color corrected color pixels, and corrects the color according to the characteristic saturation of each color pixel after the color correction. The color correction parameters of the module are adjusted. Then, the color-corrected color pixels of the last output color are input into the color correction module adjusted by the color correction parameter, and the characteristic saturation of the color-corrected color pixels after the output color correction is obtained, and so on. The color correction parameter of the color correction module is cyclically adjusted until the characteristic saturation of each color pixel of the color correction module after the color correction parameter adjusted by the output is saturated.
S310,根据经调整后的色彩校正参数的色彩校正后的各强彩像素点的特征饱和度,对色彩增强参数进行调整,使得经调整后的色彩校正参数的色彩校正后的各强彩像素点经调整后的色彩增强参数的色彩增强后,目标图像的各图像块分别对应的强彩像素点的特征饱和度不过饱和。S310, adjusting the color enhancement parameter according to the characteristic saturation of each color pixel point after the color correction of the adjusted color correction parameter, so that the color correction pixels after the color correction of the adjusted color correction parameter After the color enhancement of the adjusted color enhancement parameter, the characteristic saturation of the corresponding strong color pixel points of each image block of the target image is not saturated.
图像色彩调整装置将经S309调整后的各强彩像素点输入色彩增强模块,获取输出的色彩增强后的各强彩像素点的特征饱和度,根据色彩增强后的各强彩像素点的特征饱和度,对色彩增强模块的色彩增强参数进行调整。然后,再将上次输出的色彩增强后的各强彩像素点输入经色彩增强参数调整后的色彩增强模块,获取输出的色彩增强后的各强彩像素点的特征饱和度,以此类推,对色彩增强模块的色彩增强参数进行循环调整,直到输出的经色彩增强参数调整后的色彩增强模块的色彩增强后的各强彩像素点分别对应的特征饱和度不过饱和。The image color adjusting device inputs the strong color pixels adjusted by S309 into the color enhancement module, and obtains the characteristic saturation of the color pixels after the color enhancement of the output, and saturates according to the characteristics of the color pixels after the color enhancement. Degree, adjust the color enhancement parameters of the color enhancement module. Then, the color pixels that have been enhanced by the last output are input into the color enhancement module adjusted by the color enhancement parameter, and the characteristic saturation of each color pixel after the color enhancement is obtained, and so on. The color enhancement parameters of the color enhancement module are cyclically adjusted until the color saturation of the color enhancement module adjusted by the color enhancement parameter is respectively saturated with the characteristic saturation of each of the strong color pixels.
S311,根据经调整后的色彩增强参数的色彩增强后的各强彩像素点的特征饱和度,对色调调整参数进行调整,使得经调整后的色彩增强参数的色彩增强后的各强彩像素点经调整后的色调调整参数的色调调整后,目标图像的各图像块分别对应的强彩像素点的特征饱和度不过饱和。S311: Adjust the tone adjustment parameter according to the characteristic saturation of each of the strong color pixels after the color enhancement parameter of the adjusted color enhancement parameter, so that the color pixels of the adjusted color enhancement parameter are enhanced. After the tone adjustment of the adjusted tone adjustment parameter, the feature saturation of the strong color pixel corresponding to each image block of the target image is not saturated.
图像色彩调整装置将经S310调整后的各强彩像素点输入三维查找表模块,获取输出的色调调整后的各强彩像素点的特征饱和度,根据色调调整后的各强彩像素点的特征饱和度,对三维查找表模块的色调调整参数进行调整。然后,再将上次输出的色调调整后的各强彩像素点输入经色调调整参数调整后的三维查找表模块,获取输出的色调调整后的各强彩像素点的特征饱和度,以此类推,对三维查找表模块的色调调整参数进行循环调整,直到输出的经色调调整参数调整后的三维查找表模块的色调调整后的各强彩像素点的特征饱和度不过饱和。The image color adjusting device inputs the strong color pixels adjusted by S310 into the three-dimensional lookup table module, and obtains the characteristic saturation of the color tone pixels after the color tone adjustment, and the characteristics of the strong color pixels according to the color tone adjustment. Saturation, adjusts the tonal adjustment parameters of the 3D lookup table module. Then, the strong color pixels after the last color tone adjustment are input into the three-dimensional lookup table module adjusted by the tone adjustment parameter, and the characteristic saturation of each color pixel point after the tone adjustment is obtained, and so on. The loop adjustment parameter of the three-dimensional look-up table module is cyclically adjusted until the characteristic saturation of each of the strong color pixels after the tone adjustment of the output three-dimensional look-up table module adjusted by the tone adjustment parameter is not saturated.
需要说明的是,上述S309-S311中,对于不过饱和的具体衡量方式可以参见S202中的三种可能的实现方式的描述。It should be noted that, in the foregoing S309-S311, for a specific measurement manner of not saturating, refer to the description of the three possible implementation manners in S202.
可选的,S311之前,图像色彩调整装置还可以将色彩增强后的各强彩像素点通过亮度 对准模块调整。例如图1中的亮度对准Gamma模块1024。亮度对准模块可以先对色彩增强后的各强彩像素点进行亮度调整,然后在根据亮度对准后的各强彩像素点,对三维查找表模块的色调调整参数进行调整,使得对三维查找表模块的调整可以更加的准确。Optionally, before S311, the image color adjustment device may further adjust the color enhanced pixel points by the brightness alignment module. For example, the brightness in FIG. 1 is aligned with the Gamma module 1024. The brightness alignment module can first adjust the brightness of each color pixel after the color enhancement, and then adjust the tone adjustment parameters of the three-dimensional lookup table module according to the intensity of the highlighted color pixels, so that the three-dimensional search is performed. The adjustment of the table module can be more accurate.
S312,按照调整后的色彩参数对目标图像进行色彩调整。S312, performing color adjustment on the target image according to the adjusted color parameter.
在本申请实施例中,色彩调整模块包括色彩校正模块、色彩增强模块和三维查找表模块。完成了色彩校正模块、色彩增强模块和三维查找表模块分别对应的色彩参数的调整之后,就可以按照调整后的色彩调整模块的色彩参数,通过色彩调整模块对目标图像进行色彩调整,即将目标图像输入上述调整后的色彩校正模块、色彩增强模块和三维查找表模块进行色彩调整,从而避免过强的颜色增益造成色彩调整后的目标图像的过饱和。In the embodiment of the present application, the color adjustment module includes a color correction module, a color enhancement module, and a three-dimensional lookup table module. After the color parameter adjustment corresponding to the color correction module, the color enhancement module and the three-dimensional lookup table module is completed, the color parameter of the adjusted color adjustment module can be used to adjust the color of the target image through the color adjustment module, that is, the target image Input the above-mentioned adjusted color correction module, color enhancement module and three-dimensional look-up table module for color adjustment, so as to avoid over-saturation of the target image after color adjustment caused by excessive color gain.
本申请实施例中,通过获取目标图像的各图像块对应的一个强彩像素点的颜色特征值,可以从包含大量像素点的目标图像中提取出最能反映其图像色彩特征的少量强彩像素点,基于强彩像素点对色彩参数进行调整,从而输出色彩效果更好的目标图像。可以极大的减少运算的工作量,同时,也能够保证图像色彩调整的精准度和适应性,提高图像色彩调整的效率。In the embodiment of the present application, by acquiring the color feature values of a strong color pixel corresponding to each image block of the target image, a small number of strong color pixels that best reflect the color characteristics of the image may be extracted from the target image including a plurality of pixel points. Point, adjust the color parameters based on the strong color pixels to output a target image with better color effect. It can greatly reduce the workload of the calculation. At the same time, it can also ensure the accuracy and adaptability of image color adjustment and improve the efficiency of image color adjustment.
上文主要从不同网元之间交互的角度对本申请实施例提供的方案进行了介绍。可以理解的是,图像色彩调整装置为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。结合本申请中所公开的实施例描述的各示例的单元及算法步骤,本申请实施例能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以对每个特定的应用来使用不同的方法来实现所描述的功能,但是这种实现不应认为超出本申请实施例的技术方案的范围。The solution provided by the embodiment of the present application is mainly introduced from the perspective of interaction between different network elements. It can be understood that the image color adjustment device includes hardware structures and/or software modules corresponding to the execution of the respective functions in order to implement the above functions. The embodiments of the present application can be implemented in a combination of hardware or hardware and computer software in combination with the elements of the examples and algorithm steps described in the embodiments disclosed in the application. Whether a function is implemented in hardware or computer software to drive hardware depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the technical solutions of the embodiments of the present application.
本申请实施例可以根据上述方法示例对图像色彩调整装置进行功能模块或功能单元的划分,例如,可以对应各个功能划分各个功能模块或功能单元,也可以将两个或两个以上的功能集成在一个处理模块或处理单元中。上述集成的模块或单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块或单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。请参见以下具体介绍。The embodiment of the present application may perform the division of the function module or the function unit on the image color adjustment device according to the above method example. For example, each function module or function unit may be divided according to each function, or two or more functions may be integrated in the In a processing module or processing unit. The above integrated modules or units can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules or units in the embodiments of the present application is schematic, and is only a logical function division. In actual implementation, there may be another division manner. Please see the specifics below.
请参阅图5,图5是本申请实施例提供的一种图像色彩调整装置的结构示意图。该装置可以用于实现上述图2或图3所示的实施例中的图像色彩调整装置。如图5所示,该装置包括:Please refer to FIG. 5. FIG. 5 is a schematic structural diagram of an image color adjustment apparatus according to an embodiment of the present application. The apparatus can be used to implement the image color adjustment apparatus of the embodiment shown in Fig. 2 or Fig. 3 described above. As shown in Figure 5, the device includes:
获取模块501,用于针对目标图像的每个图像块获取一个强彩像素点的颜色特征值,所述目标图像为经过自动白平衡校正后的图像,所述强彩像素点为用于表征图像块的色彩特性的像素点;The obtaining module 501 is configured to obtain a color feature value of a strong color pixel point for each image block of the target image, where the target image is an image after automatic white balance correction, and the strong color pixel point is used to represent the image The pixel point of the color characteristic of the block;
参数调整模块502,用于根据所述目标图像的各图像块分别对应的强彩像素点的颜色特征值调整色彩参数;The parameter adjustment module 502 is configured to adjust a color parameter according to a color feature value of a strong color pixel corresponding to each image block of the target image;
色彩调整模块503,用于按照调整后的色彩参数对所述目标图像进行色彩调整。The color adjustment module 503 is configured to perform color adjustment on the target image according to the adjusted color parameter.
可选的,所述参数调整模块502具体用于:Optionally, the parameter adjustment module 502 is specifically configured to:
根据所述目标图像的各图像块分别对应的强彩像素点的颜色特征值,确定各图像块分别对应的强彩像素点的特征饱和度;Determining, according to a color feature value of the strong color pixel corresponding to each image block of the target image, a feature saturation of the strong color pixel corresponding to each image block;
根据所述目标图像的各图像块分别对应的强彩像素点的特征饱和度,对所述色彩参数进行调整,使得所述目标图像的各图像块分别对应的强彩像素点经调整后的色彩参数进行色彩调整之后,所述目标图像的各图像块分别对应的强彩像素点的特征饱和度不过饱和。Adjusting the color parameter according to the feature saturation of the strong color pixel corresponding to each image block of the target image, so that each image block of the target image respectively corresponds to the adjusted color of the strong color pixel point After the parameter is color-adjusted, the characteristic saturation of the corresponding strong color pixel points of each image block of the target image is not saturated.
可选的,所述色彩参数包括色彩校正参数或色调调整参数。Optionally, the color parameter includes a color correction parameter or a tone adjustment parameter.
可选的,所述色彩参数包括色彩校正参数、色彩增强参数和色调调整参数;Optionally, the color parameter includes a color correction parameter, a color enhancement parameter, and a tone adjustment parameter;
所述参数调整模块502具体用于:The parameter adjustment module 502 is specifically configured to:
根据所述目标图像的各图像块分别对应的强彩像素点的特征饱和度,对所述色彩校正参数进行调整,使得所述目标图像的各图像块分别对应的强彩像素点经调整后的色彩校正参数的色彩校正后,所述目标图像的各图像块分别对应的强彩像素点的特征饱和度不过饱和;Adjusting the color correction parameters according to the feature saturation of the strong color pixel points corresponding to the image blocks of the target image, so that the respective color image pixels corresponding to the image blocks of the target image are adjusted After the color correction of the color correction parameter, the characteristic saturation of the corresponding strong color pixel points of each image block of the target image is not saturated;
根据所述经调整后的色彩校正参数的色彩校正后的各强彩像素点的特征饱和度,对所述色彩增强参数进行调整,使得所述经调整后的色彩校正参数的色彩校正后的各强彩像素点经调整后的色彩增强参数的色彩增强后,所述目标图像的各图像块分别对应的强彩像素点的特征饱和度不过饱和;Adjusting the color enhancement parameter according to the characteristic saturation of each color pixel point after the color correction of the adjusted color correction parameter, so that the color correction of the adjusted color correction parameter is performed after each After the color enhancement of the adjusted color enhancement parameter of the strong color pixel is performed, the characteristic saturation of the corresponding strong color pixel point of each image block of the target image is not saturated;
根据所述经调整后的色彩增强参数的色彩增强后的各强彩像素点的特征饱和度,对所述色调调整参数进行调整,使得所述经调整后的色彩增强参数的色彩增强后的各强彩像素点经调整后的色调调整参数的色调调整后,所述目标图像的各图像块分别对应的强彩像素点的特征饱和度不过饱和。Adjusting the tone adjustment parameter according to the feature saturation of each of the strong color pixels after the color enhancement of the adjusted color enhancement parameter, so that the color of the adjusted color enhancement parameter is enhanced After the color tone adjustment of the adjusted color tone adjustment parameter of the strong color pixel is performed, the feature saturation of the strong color pixel corresponding to each image block of the target image is not saturated.
可选的,所述参数调整模块502具体用于:Optionally, the parameter adjustment module 502 is specifically configured to:
根据所述目标图像的各图像块分别对应的强彩像素点的特征饱和度,对所述色彩参数进行调整;Adjusting the color parameter according to a feature saturation of a strong color pixel corresponding to each image block of the target image;
获取经所述调整后的色彩参数的色彩调整后的各强彩像素点中,对应的特征饱和度高于第一饱和度阈值的强彩像素点的第一像素点数量;Obtaining, in each of the strong color pixels after the color adjustment of the adjusted color parameter, the corresponding number of first pixels of the strong color pixel whose feature saturation is higher than the first saturation threshold;
当所述第一像素点数量大于或等于第一数量阈值时,降低所述色彩参数,直到所述第一像素点数量小于所述第一数量阈值。When the number of the first pixel points is greater than or equal to the first number threshold, the color parameter is decreased until the number of the first pixel points is less than the first number threshold.
可选的,所述参数调整模块502具体用于:Optionally, the parameter adjustment module 502 is specifically configured to:
根据所述目标图像的各图像块分别对应的强彩像素点的特征饱和度,对所述色彩参数进行调整;Adjusting the color parameter according to a feature saturation of a strong color pixel corresponding to each image block of the target image;
获取经所述调整后的色彩参数的色彩调整后的各强彩像素点中,对应的特征饱和度分别处于M个高饱和度范围的强彩像素点的像素点数量;所述M个高饱和度范围为预设的多个饱和度范围从高到低排序后排名前M个的饱和度范围,M为大于1的正整数;Obtaining, in each of the strong color pixels after the color adjustment of the adjusted color parameter, the corresponding feature saturation is respectively in the number of pixels of the strong color pixel points of the M high saturation range; the M high saturation The degree range is a preset plurality of saturation ranges from high to low ranked after the top M saturation ranges, and M is a positive integer greater than one;
当所述M个高饱和度范围中至少一个目标高饱和度范围对应的像素点数量大于或等于所述目标高饱和度范围对应的第二数量阈值时,降低所述色彩参数,直到所述M个高饱和度范围分别对应的像素点数量均小于所述M个高饱和度范围分别对应的第二数量阈值。When the number of pixel points corresponding to at least one target high saturation range of the M high saturation ranges is greater than or equal to a second quantity threshold corresponding to the target high saturation range, the color parameter is lowered until the M The number of pixels corresponding to each of the high saturation ranges is smaller than the second number threshold corresponding to the M high saturation ranges respectively.
可选的,所述参数调整模块502具体用于:Optionally, the parameter adjustment module 502 is specifically configured to:
根据所述目标图像的各图像块分别对应的强彩像素点的特征饱和度,对所述色彩参数 进行调整;Adjusting the color parameter according to a feature saturation of a strong color pixel corresponding to each image block of the target image;
获取经所述调整后的色彩参数的色彩调整后的各强彩像素点中,对应的特征饱和度分别处于M个高饱和度范围的强彩像素点的像素点数量以及所述M个高饱和度范围分别对应的权重参数;所述M个高饱和度范围为预设的多个饱和度范围从高到低排序后排名前M个的饱和度范围,M为大于1的正整数;Obtaining, in each of the strong color pixels after the color adjustment of the adjusted color parameter, the corresponding feature saturation is in the number of pixels of the high color saturation pixel of the M high saturation range and the M high saturation The weight ranges respectively correspond to the weight ranges; the M high saturation ranges are preset saturation ranges of the top M after the plurality of saturation ranges are sorted from high to low, and M is a positive integer greater than 1;
计算第二像素点数量,所述第二像素点数量为各高饱和度范围分别对应的像素点数量与各高饱和度范围对应的权重参数相乘后得到的数值之和;Calculating a number of second pixel points, wherein the number of the second pixel points is a sum of values obtained by multiplying the number of pixels corresponding to each high saturation range by a weight parameter corresponding to each high saturation range;
当所述第二像素点数量大于或等于第三数量阈值时,降低所述色彩参数,直到所述第二像素点数量小于所述第三数量阈值。When the number of the second pixel points is greater than or equal to the third number threshold, the color parameter is decreased until the number of the second pixel points is less than the third number threshold.
可选的,所述获取模块501还用于:将所述目标图像的各图像块分别对应的强彩像素点的特征饱和度与第一饱和度阈值比较,确定第三像素点数量,所述第三像素点数量为所述目标图像的各图像块分别对应的强彩像素点中对应的特征饱和度小于所述第一饱和度阈值的强彩像素点的数量;Optionally, the acquiring module 501 is further configured to: compare a feature saturation of a strong color pixel corresponding to each image block of the target image with a first saturation threshold, and determine a third pixel number, The number of the third pixel points is the number of the strong color pixel points corresponding to the feature saturation of the strong color pixel corresponding to each image block of the target image that is smaller than the first saturation threshold;
所述装置还包括:The device also includes:
比较模块504,用于确定所述第三像素点数量小于第四数量阈值。The comparing module 504 is configured to determine that the number of the third pixel points is less than a fourth number threshold.
可选的,所述获取模块501具体用于:Optionally, the obtaining module 501 is specifically configured to:
获取目标图像的各图像块分别对应的像素点中亮度高于第一亮度阈值的至少一个目标像素点;Acquiring at least one target pixel point of the pixel corresponding to each image block of the target image that is higher in brightness than the first brightness threshold;
从所述至少一个目标像素点中确定出N个高饱和像素点,所述N个高饱和像素点为所述至少一个目标像素点中参考饱和度从高到低排序后排名前N个的目标像素点,N为大于等于1的正整数;Determining N high-saturation pixel points from the at least one target pixel point, wherein the N high-saturation pixel points are the top N target after the reference saturation is sorted from high to low in the at least one target pixel point a pixel, where N is a positive integer greater than or equal to 1;
根据所述目标图像的各图像块中所述N个高饱和像素点的颜色值,确定所述目标图像的各图像块分别对应的一个强彩像素点的颜色特征值。Determining, according to color values of the N high-saturation pixel points in each image block of the target image, color feature values of a strong color pixel corresponding to each image block of the target image.
可选的,所述获取模块501具体用于:Optionally, the obtaining module 501 is specifically configured to:
获取目标图像的各图像块分别对应的像素点中色相符合第一色相范围和亮度高于第一亮度阈值的至少一个目标像素点。Obtaining, in each pixel block corresponding to each image block of the target image, the hue conforms to the first hue range and the at least one target pixel whose brightness is higher than the first brightness threshold.
可选的,所述获取模块501还用于:Optionally, the obtaining module 501 is further configured to:
获取所述目标图像对应的场景信息;Obtaining scene information corresponding to the target image;
根据所述目标图像对应的场景信息,确定所述场景信息对应的待调整的所述第一色相范围。Determining, according to the scene information corresponding to the target image, the first hue range to be adjusted corresponding to the scene information.
可选的,所述参考饱和度为饱和度;或,所述参考饱和度为饱和度与亮度共同确定的综合值。Optionally, the reference saturation is saturation; or the reference saturation is a comprehensive value determined by the saturation and the brightness.
可选的,所述获取501模块具体用于:Optionally, the acquiring 501 module is specifically configured to:
当N等于1时,确定所述目标图像的各图像块对应的一个高饱和像素点的颜色值为所述目标图像的各图像块分别对应的一个强彩像素点的颜色特征值;When N is equal to 1, determining that a color value of a high-saturation pixel corresponding to each image block of the target image is a color feature value of a strong color pixel corresponding to each image block of the target image;
当N大于1时,分别计算所述目标图像的各图像块对应的N个高饱和像素点的颜色值的平均值;确定所述目标图像的各图像块对应的N个高饱和像素点的颜色值的平均值为所述目标图像的各图像块分别对应的一个强彩像素点的颜色特征值。When N is greater than 1, respectively, calculating an average value of color values of N high-saturation pixel points corresponding to each image block of the target image; determining color of N high-saturation pixel points corresponding to each image block of the target image The average value of the values is a color feature value of one strong color pixel corresponding to each image block of the target image.
上述图5所示实施例中的图像色彩调整装置可以以图6所示的图像色彩调整装置600实现。如图6所示,为本申请实施例提供了另一种图像色彩调整装置的结构示意图,图6所示的图像色彩调整装置600包括处理器601,处理器601用于实现图5中获取模块501、参数调整模块502、色彩调整模块503和比较模块504中任一模块所执行的动作。处理器601和收发器603通信连接,例如通过总线相连。所述图像色彩调整装置600还可以包括存储器602。存储器602用于存储供图像色彩调整装置600执行的程序代码和数据,处理器601用于执行存储器602中存储的应用程序代码,以实现图2-图3所示实施例提供的图像色彩调整装置的动作。所述图像色彩调整装置600还可以包括收发器603,收发器603用于支持图像色彩调整装置600与其他终端设备之间的信息传输。The image color adjusting device in the embodiment shown in FIG. 5 described above can be implemented by the image color adjusting device 600 shown in FIG. 6. FIG. 6 is a schematic structural diagram of another image color adjustment apparatus according to an embodiment of the present application. The image color adjustment apparatus 600 shown in FIG. 6 includes a processor 601, and the processor 601 is configured to implement the acquisition module in FIG. 501. An action performed by any one of the parameter adjustment module 502, the color adjustment module 503, and the comparison module 504. The processor 601 and the transceiver 603 are communicatively coupled, such as by a bus. The image color adjustment device 600 may also include a memory 602. The memory 602 is configured to store program code and data for execution by the image color adjustment device 600, and the processor 601 is configured to execute the application code stored in the memory 602 to implement the image color adjustment device provided by the embodiment shown in FIG. Actions. The image color adjustment device 600 may further include a transceiver 603 for supporting information transmission between the image color adjustment device 600 and other terminal devices.
需要说明的是,实际应用中图像色彩调整装置600可以包括一个或者多个处理器,该图像色彩调整装置600的结构并不构成对本发明实施例的限定。It should be noted that, in actual application, the image color adjustment device 600 may include one or more processors, and the structure of the image color adjustment device 600 does not constitute a limitation on the embodiment of the present invention.
处理器601可以是中央处理器(central processing unit,CPU),网络处理器(network processor,NP),硬件芯片或者其任意组合。上述硬件芯片可以是专用集成电路(application-specific integrated circuit,ASIC),可编程逻辑器件(programmable logic device,PLD)或其组合。上述PLD可以是复杂可编程逻辑器件(complex programmable logic device,CPLD),现场可编程逻辑门阵列(field-programmable gate array,FPGA),通用阵列逻辑(generic array logic,GAL)或其任意组合。The processor 601 can be a central processing unit (CPU), a network processor (NP), a hardware chip, or any combination thereof. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a general array logic (GAL), or any combination thereof.
存储器602可以包括易失性存储器(volatile memory),例如随机存取存储器(random access memory,RAM);存储器602也可以包括非易失性存储器(non-volatile memory),例如只读存储器(read-only memory,ROM),快闪存储器(flash memory),硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD);存储器602还可以包括上述种类的存储器的组合。The memory 602 may include a volatile memory such as a random access memory (RAM); the memory 602 may also include a non-volatile memory such as a read-only memory (read- Only memory, ROM), flash memory, hard disk drive (HDD) or solid-state drive (SSD); the memory 602 may also include a combination of the above types of memories.
在本申请实施例中还提供了一种计算机存储介质,可以用于存储图2-图3所示实施例中图像色彩调整装置所用的计算机软件指令,其包含用于执行上述实施例中为图像色彩调整装置所设计的程序。该存储介质包括但不限于快闪存储器、硬盘、固态硬盘。Also provided in the embodiment of the present application is a computer storage medium, which can be used to store computer software instructions used in the image color adjustment device in the embodiment shown in FIG. 2 to FIG. 3, and includes an image for performing the above embodiment. The program designed by the color adjustment device. The storage medium includes, but is not limited to, a flash memory, a hard disk, a solid state disk.
在本申请实施例中还提供了一种计算机程序产品,该计算机产品被计算设备运行时,可以执行上述图2-图3实施例中为图像色彩调整装置所设计的图像色彩调整方法。In the embodiment of the present application, a computer program product is also provided. When the computer product is operated by the computing device, the image color adjustment method designed for the image color adjusting device in the embodiment of FIG. 2 to FIG. 3 may be executed.
本发明的说明书和权利要求书及所述附图中的术语“第一”、“第二”、“第三”和“第四”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选的还包括没有列出的步骤或单元,或可选的还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third", and "fourth" and the like in the specification and claims of the present invention are used to distinguish different objects, and are not intended to describe a specific order. . Furthermore, the terms "comprises" and "comprising" and "comprising" are intended to cover a non-exclusive inclusion. For example, a process, method, system, product, or device that comprises a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units not listed, or alternatively includes Other steps or units inherent to these processes, methods, products or equipment.
本领域普通技术人员可以理解,在本发明的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本发明实施例的实施过程构成任何限定。It will be understood by those skilled in the art that in various embodiments of the present invention, the size of the sequence numbers of the above processes does not mean the order of execution, and the order of execution of each process should be determined by its function and internal logic, without The implementation of the embodiments of the present invention should be construed as being limited in any way.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产 品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本发明实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in accordance with embodiments of the present invention are generated in whole or in part. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be from a website site, computer, server or data center Transfer to another website site, computer, server, or data center by wire (eg, coaxial cable, fiber optic, digital subscriber line (DSL), or wireless (eg, infrared, wireless, microwave, etc.). The computer readable storage medium can be any available media that can be accessed by a computer or a data storage device such as a server, data center, or the like that includes one or more available media. The usable medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (such as a solid state disk (SSD)).
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。One of ordinary skill in the art can understand that all or part of the process of implementing the foregoing embodiments can be completed by a computer program to instruct related hardware, and the program can be stored in a computer readable storage medium. When executed, the flow of an embodiment of the methods as described above may be included. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
以上所揭露的仅为本发明较佳实施例而已,当然不能以此来限定本发明之权利范围,因此依本发明权利要求所作的等同变化,仍属本发明所涵盖的范围。The above is only the preferred embodiment of the present invention, and the scope of the present invention is not limited thereto, and thus equivalent changes made in the claims of the present invention are still within the scope of the present invention.

Claims (28)

  1. 一种图像色彩调整方法,其特征在于,包括:An image color adjustment method, comprising:
    针对目标图像的每个图像块获取一个强彩像素点的颜色特征值,所述目标图像为经过自动白平衡校正后的图像,所述强彩像素点为用于表征图像块的色彩特性的像素点;Obtaining a color feature value of a strong color pixel for each image block of the target image, the target image being an image after automatic white balance correction, wherein the strong color pixel is a pixel for characterizing a color characteristic of the image block point;
    根据所述目标图像的各图像块分别对应的强彩像素点的颜色特征值调整色彩参数;Adjusting a color parameter according to a color feature value of a strong color pixel corresponding to each image block of the target image;
    按照调整后的色彩参数对所述目标图像进行色彩调整。Color adjustment is performed on the target image according to the adjusted color parameter.
  2. 如权利要求1所述的方法,其特征在于,所述根据所述目标图像的各图像块分别对应的强彩像素点的颜色特征值调整色彩参数包括:The method according to claim 1, wherein the adjusting the color parameter according to the color feature value of the strong color pixel corresponding to each image block of the target image comprises:
    根据所述目标图像的各图像块分别对应的强彩像素点的颜色特征值,确定各图像块分别对应的强彩像素点的特征饱和度;Determining, according to a color feature value of the strong color pixel corresponding to each image block of the target image, a feature saturation of the strong color pixel corresponding to each image block;
    根据所述目标图像的各图像块分别对应的强彩像素点的特征饱和度,对所述色彩参数进行调整,使得所述目标图像的各图像块分别对应的强彩像素点经调整后的色彩参数进行色彩调整之后,所述目标图像的各图像块分别对应的强彩像素点的特征饱和度不过饱和。Adjusting the color parameter according to the feature saturation of the strong color pixel corresponding to each image block of the target image, so that each image block of the target image respectively corresponds to the adjusted color of the strong color pixel point After the parameter is color-adjusted, the characteristic saturation of the corresponding strong color pixel points of each image block of the target image is not saturated.
  3. 如权利要求2所述的方法,其特征在于,所述色彩参数包括色彩校正参数、色彩增强参数或色调调整参数。The method of claim 2 wherein said color parameters comprise color correction parameters, color enhancement parameters or tone adjustment parameters.
  4. 如权利要求2所述的方法,其特征在于,所述色彩参数包括色彩校正参数、色彩增强参数和色调调整参数;The method of claim 2 wherein said color parameters comprise color correction parameters, color enhancement parameters, and tone adjustment parameters;
    所述根据所述目标图像的各图像块分别对应的强彩像素点的特征饱和度,对所述色彩参数进行调整,使得所述目标图像的各图像块分别对应的强彩像素点经调整后的色彩参数进行色彩调整之后,所述目标图像的各图像块分别对应的强彩像素点的特征饱和度不过饱和包括:The color parameter is adjusted according to the feature saturation of the strong color pixel corresponding to each image block of the target image, so that the corresponding strong color pixel points of each image block of the target image are adjusted. After the color parameter is color-adjusted, the characteristic saturation of the corresponding strong color pixel points of each image block of the target image is saturated but includes:
    根据所述目标图像的各图像块分别对应的强彩像素点的特征饱和度,对所述色彩校正参数进行调整,使得所述目标图像的各图像块分别对应的强彩像素点经调整后的色彩校正参数的色彩校正后,所述目标图像的各图像块分别对应的强彩像素点的特征饱和度不过饱和;Adjusting the color correction parameters according to the feature saturation of the strong color pixel points corresponding to the image blocks of the target image, so that the respective color image pixels corresponding to the image blocks of the target image are adjusted After the color correction of the color correction parameter, the characteristic saturation of the corresponding strong color pixel points of each image block of the target image is not saturated;
    根据所述经调整后的色彩校正参数的色彩校正后的各强彩像素点的特征饱和度,对所述色彩增强参数进行调整,使得所述经调整后的色彩校正参数的色彩校正后的各强彩像素点经调整后的色彩增强参数的色彩增强后,所述目标图像的各图像块分别对应的强彩像素点的特征饱和度不过饱和;Adjusting the color enhancement parameter according to the characteristic saturation of each color pixel point after the color correction of the adjusted color correction parameter, so that the color correction of the adjusted color correction parameter is performed after each After the color enhancement of the adjusted color enhancement parameter of the strong color pixel is performed, the characteristic saturation of the corresponding strong color pixel point of each image block of the target image is not saturated;
    根据所述经调整后的色彩增强参数的色彩增强后的各强彩像素点的特征饱和度,对所述色调调整参数进行调整,使得所述经调整后的色彩增强参数的色彩增强后的各强彩像素点经调整后的色调调整参数的色调调整后,所述目标图像的各图像块分别对应的强彩像素点的特征饱和度不过饱和。Adjusting the tone adjustment parameter according to the feature saturation of each of the strong color pixels after the color enhancement of the adjusted color enhancement parameter, so that the color of the adjusted color enhancement parameter is enhanced After the color tone adjustment of the adjusted color tone adjustment parameter of the strong color pixel is performed, the feature saturation of the strong color pixel corresponding to each image block of the target image is not saturated.
  5. 如权利要求2或3所述的方法,其特征在于,所述根据所述目标图像的各图像块分别对应的强彩像素点的特征饱和度,对所述色彩参数进行调整,使得所述目标图像的各图像块分别对应的强彩像素点经调整后的色彩参数进行色彩调整之后,所述目标图像的各图像块分别对应的强彩像素点的特征饱和度不过饱和包括:The method according to claim 2 or 3, wherein the color parameter is adjusted according to a feature saturation of a strong color pixel corresponding to each image block of the target image, so that the target After the color parameters of the image pixels of the image are adjusted by the adjusted color parameters, the characteristic saturations of the corresponding strong color pixels of each image block of the target image are saturated but include:
    根据所述目标图像的各图像块分别对应的强彩像素点的特征饱和度,对所述色彩参数进行调整;Adjusting the color parameter according to a feature saturation of a strong color pixel corresponding to each image block of the target image;
    获取经所述调整后的色彩参数的色彩调整后的各强彩像素点中,对应的特征饱和度高于第一饱和度阈值的强彩像素点的第一像素点数量;Obtaining, in each of the strong color pixels after the color adjustment of the adjusted color parameter, the corresponding number of first pixels of the strong color pixel whose feature saturation is higher than the first saturation threshold;
    当所述第一像素点数量大于或等于第一数量阈值时,降低所述色彩参数,直到所述第一像素点数量小于所述第一数量阈值。When the number of the first pixel points is greater than or equal to the first number threshold, the color parameter is decreased until the number of the first pixel points is less than the first number threshold.
  6. 如权利要求2或3所述的方法,其特征在于,所述根据所述目标图像的各图像块分别对应的强彩像素点的特征饱和度,对所述色彩参数进行调整,使得所述目标图像的各图像块分别对应的强彩像素点经调整后的色彩参数进行色彩调整之后,所述目标图像的各图像块分别对应的强彩像素点的特征饱和度不过饱和包括:The method according to claim 2 or 3, wherein the color parameter is adjusted according to a feature saturation of a strong color pixel corresponding to each image block of the target image, so that the target After the color parameters of the image pixels of the image are adjusted by the adjusted color parameters, the characteristic saturations of the corresponding strong color pixels of each image block of the target image are saturated but include:
    根据所述目标图像的各图像块分别对应的强彩像素点的特征饱和度,对所述色彩参数进行调整;Adjusting the color parameter according to a feature saturation of a strong color pixel corresponding to each image block of the target image;
    获取经所述调整后的色彩参数的色彩调整后的各强彩像素点中,对应的特征饱和度分别处于M个高饱和度范围的强彩像素点的像素点数量;所述M个高饱和度范围为预设的多个饱和度范围从高到低排序后排名前M个的饱和度范围,M为大于1的正整数;Obtaining, in each of the strong color pixels after the color adjustment of the adjusted color parameter, the corresponding feature saturation is respectively in the number of pixels of the strong color pixel points of the M high saturation range; the M high saturation The degree range is a preset plurality of saturation ranges from high to low ranked after the top M saturation ranges, and M is a positive integer greater than one;
    当所述M个高饱和度范围中至少一个目标高饱和度范围对应的像素点数量大于或等于所述目标高饱和度范围对应的第二数量阈值时,降低所述色彩参数,直到所述M个高饱和度范围分别对应的像素点数量均小于所述M个高饱和度范围分别对应的第二数量阈值。When the number of pixel points corresponding to at least one target high saturation range of the M high saturation ranges is greater than or equal to a second quantity threshold corresponding to the target high saturation range, the color parameter is lowered until the M The number of pixels corresponding to each of the high saturation ranges is smaller than the second number threshold corresponding to the M high saturation ranges respectively.
  7. 如权利要求2或3所述的方法,其特征在于,所述根据所述目标图像的各图像块分别对应的强彩像素点的特征饱和度,对所述色彩参数进行调整,使得所述目标图像的各图像块分别对应的强彩像素点经调整后的色彩参数进行色彩调整之后,所述目标图像的各图像块分别对应的强彩像素点的特征饱和度不过饱和包括:The method according to claim 2 or 3, wherein the color parameter is adjusted according to a feature saturation of a strong color pixel corresponding to each image block of the target image, so that the target After the color parameters of the image pixels of the image are adjusted by the adjusted color parameters, the characteristic saturations of the corresponding strong color pixels of each image block of the target image are saturated but include:
    根据所述目标图像的各图像块分别对应的强彩像素点的特征饱和度,对所述色彩参数进行调整;Adjusting the color parameter according to a feature saturation of a strong color pixel corresponding to each image block of the target image;
    获取经所述调整后的色彩参数的色彩调整后的各强彩像素点中,对应的特征饱和度分别处于M个高饱和度范围的强彩像素点的像素点数量以及所述M个高饱和度范围分别对应的权重参数;所述M个高饱和度范围为预设的多个饱和度范围从高到低排序后排名前M个的饱和度范围,M为大于1的正整数;Obtaining, in each of the strong color pixels after the color adjustment of the adjusted color parameter, the corresponding feature saturation is in the number of pixels of the high color saturation pixel of the M high saturation range and the M high saturation The weight ranges respectively correspond to the weight ranges; the M high saturation ranges are preset saturation ranges of the top M after the plurality of saturation ranges are sorted from high to low, and M is a positive integer greater than 1;
    计算第二像素点数量,所述第二像素点数量为各高饱和度范围分别对应的像素点数量与各高饱和度范围对应的权重参数相乘后得到的数值之和;Calculating a number of second pixel points, wherein the number of the second pixel points is a sum of values obtained by multiplying the number of pixels corresponding to each high saturation range by a weight parameter corresponding to each high saturation range;
    当所述第二像素点数量大于或等于第三数量阈值时,降低所述色彩参数,直到所述第二像素点数量小于所述第三数量阈值。When the number of the second pixel points is greater than or equal to the third number threshold, the color parameter is decreased until the number of the second pixel points is less than the third number threshold.
  8. 如权利要求2-7任一项所述的方法,其特征在于,所述根据所述目标图像的各图像块分别对应的强彩像素点的特征饱和度,对所述色彩参数进行调整,使得所述目标图像的各图像块分别对应的强彩像素点经调整后的色彩参数进行色彩调整之后,所述目标图像的各图像块分别对应的强彩像素点的特征饱和度不过饱和之前,还包括:The method according to any one of claims 2 to 7, wherein the color parameter is adjusted according to a feature saturation of a strong color pixel corresponding to each image block of the target image, such that After each of the image blocks of the target image is color-adjusted by the adjusted color parameter of each of the image pixels, the characteristic saturation of the corresponding color pixel points of each image block of the target image is saturated before being saturated. include:
    将所述目标图像的各图像块分别对应的强彩像素点的特征饱和度与第一饱和度阈值比较,确定第三像素点数量,所述第三像素点数量为所述目标图像的各图像块分别对应的强彩像素点中对应的特征饱和度小于所述第一饱和度阈值的强彩像素点的数量;Comparing the feature saturation of the strong color pixel corresponding to each image block of the target image with the first saturation threshold to determine the third pixel number, wherein the third pixel number is each image of the target image a corresponding number of strong color pixels in the strong color pixel corresponding to the block having a characteristic saturation greater than the first saturation threshold;
    确定所述第三像素点数量小于第四数量阈值。It is determined that the number of the third pixel points is less than a fourth number threshold.
  9. 如权利要求1-8任一项所述的方法,其特征在于,所述针对目标图像的每个图像块获取一个强彩像素点的颜色特征值包括:The method according to any one of claims 1 to 8, wherein the obtaining a color feature value of a strong color pixel for each image block of the target image comprises:
    获取目标图像的各图像块分别对应的像素点中亮度高于第一亮度阈值的至少一个目标像素点;Acquiring at least one target pixel point of the pixel corresponding to each image block of the target image that is higher in brightness than the first brightness threshold;
    从所述至少一个目标像素点中确定出N个高饱和像素点,所述N个高饱和像素点为所述至少一个目标像素点中参考饱和度从高到低排序后排名前N个的目标像素点,N为大于等于1的正整数;Determining N high-saturation pixel points from the at least one target pixel point, wherein the N high-saturation pixel points are the top N target after the reference saturation is sorted from high to low in the at least one target pixel point a pixel, where N is a positive integer greater than or equal to 1;
    根据所述目标图像的每个图像块中所述N个高饱和像素点的颜色值,确定所述目标图像的各图像块分别对应的一个强彩像素点的颜色特征值。And determining, according to the color values of the N high-saturation pixel points in each image block of the target image, color feature values of a strong color pixel point corresponding to each image block of the target image.
  10. 如权利要求9所述的方法,其特征在于,所述获取目标图像的各图像块分别对应的像素点中亮度高于第一亮度阈值的至少一个目标像素点包括:The method according to claim 9, wherein the acquiring at least one target pixel of the pixel corresponding to each of the image blocks of the target image having a brightness higher than the first brightness threshold comprises:
    获取目标图像的各图像块分别对应的像素点中色相符合第一色相范围和亮度高于第一亮度阈值的至少一个目标像素点。Obtaining, in each pixel block corresponding to each image block of the target image, the hue conforms to the first hue range and the at least one target pixel whose brightness is higher than the first brightness threshold.
  11. 如权利要求10所述的方法,其特征在于,所述获取目标图像的各图像块中色相符合第一色相范围和亮度高于第一亮度阈值的至少一个目标像素点之前,还包括:The method of claim 10, further comprising: before: obtaining, in the image block of the target image, the hue of the first hue and the at least one target pixel having a brightness higher than the first brightness threshold, the method further comprising:
    获取所述目标图像对应的场景信息;Obtaining scene information corresponding to the target image;
    根据所述目标图像对应的场景信息,确定所述场景信息对应的待调整的所述第一色相范围。Determining, according to the scene information corresponding to the target image, the first hue range to be adjusted corresponding to the scene information.
  12. 如权利要求9-11任一项所述的方法,其特征在于,所述参考饱和度为饱和度;或,所述参考饱和度为饱和度与亮度共同确定的综合值。The method according to any one of claims 9 to 11, wherein the reference saturation is saturation; or the reference saturation is a combined value determined by saturation and luminance.
  13. 如权利要求9-12任一项所述的方法,其特征在于,所述根据所述目标图像的每个图像块中所述N个高饱和像素点的颜色值,确定所述目标图像的各图像块分别对应的一个强彩像素点的颜色特征值包括:The method according to any one of claims 9 to 12, wherein said determining each of said target images based on color values of said N highly saturated pixel points in each image block of said target image The color feature values of a strong color pixel corresponding to the image block respectively include:
    当N等于1时,确定所述目标图像的各图像块对应的一个高饱和像素点的颜色值为所 述目标图像的各图像块分别对应的一个强彩像素点的颜色特征值;When N is equal to 1, determining that a color value of a high-saturation pixel corresponding to each image block of the target image is a color feature value of a strong color pixel corresponding to each image block of the target image;
    当N大于1时,分别计算所述目标图像的每个图像块对应的N个高饱和像素点的颜色值的平均值;确定所述目标图像的各图像块对应的N个高饱和像素点的颜色值的平均值为所述目标图像的各图像块分别对应的一个强彩像素点的颜色特征值。When N is greater than 1, an average value of color values of N high-saturation pixel points corresponding to each image block of the target image is respectively calculated; and N high-saturation pixel points corresponding to each image block of the target image are determined. The average value of the color values is a color feature value of one strong color pixel corresponding to each image block of the target image.
  14. 一种图像色彩调整装置,其特征在于,包括:An image color adjustment device, comprising:
    获取模块,用于针对目标图像的每个图像块获取一个强彩像素点的颜色特征值,所述目标图像为经过自动白平衡校正后的图像,所述强彩像素点为用于表征图像块的色彩特性的像素点;And an obtaining module, configured to acquire, for each image block of the target image, a color feature value of a strong color pixel, wherein the target image is an image after automatic white balance correction, and the strong color pixel is used to represent the image block Pixels of color characteristics;
    参数调整模块,用于根据所述目标图像的各图像块分别对应的强彩像素点的颜色特征值调整色彩参数;a parameter adjustment module, configured to adjust a color parameter according to a color feature value of a strong color pixel corresponding to each image block of the target image;
    色彩调整模块,用于按照调整后的色彩参数对所述目标图像进行色彩调整。a color adjustment module, configured to perform color adjustment on the target image according to the adjusted color parameter.
  15. 如权利要求14所述的装置,其特征在于,所述参数调整模块具体用于:The device according to claim 14, wherein the parameter adjustment module is specifically configured to:
    根据所述目标图像的各图像块分别对应的强彩像素点的颜色特征值,确定各图像块分别对应的强彩像素点的特征饱和度;Determining, according to a color feature value of the strong color pixel corresponding to each image block of the target image, a feature saturation of the strong color pixel corresponding to each image block;
    根据所述目标图像的各图像块分别对应的强彩像素点的特征饱和度,对所述色彩参数进行调整,使得所述目标图像的各图像块分别对应的强彩像素点经调整后的色彩参数进行色彩调整之后,所述目标图像的各图像块分别对应的强彩像素点的特征饱和度不过饱和。Adjusting the color parameter according to the feature saturation of the strong color pixel corresponding to each image block of the target image, so that each image block of the target image respectively corresponds to the adjusted color of the strong color pixel point After the parameter is color-adjusted, the characteristic saturation of the corresponding strong color pixel points of each image block of the target image is not saturated.
  16. 如权利要求15所述的装置,其特征在于,所述色彩参数包括色彩校正参数、色彩增强参数或色调调整参数。The apparatus of claim 15 wherein said color parameters comprise color correction parameters, color enhancement parameters, or tone adjustment parameters.
  17. 如权利要求15所述的装置,其特征在于,所述色彩参数包括色彩校正参数、色彩增强参数和色调调整参数;The apparatus according to claim 15, wherein said color parameters comprise color correction parameters, color enhancement parameters, and tone adjustment parameters;
    所述参数调整模块具体用于:The parameter adjustment module is specifically configured to:
    根据所述目标图像的各图像块分别对应的强彩像素点的特征饱和度,对所述色彩校正参数进行调整,使得所述目标图像的各图像块分别对应的强彩像素点经调整后的色彩校正参数的色彩校正后,所述目标图像的各图像块分别对应的强彩像素点的特征饱和度不过饱和;Adjusting the color correction parameters according to the feature saturation of the strong color pixel points corresponding to the image blocks of the target image, so that the respective color image pixels corresponding to the image blocks of the target image are adjusted After the color correction of the color correction parameter, the characteristic saturation of the corresponding strong color pixel points of each image block of the target image is not saturated;
    根据所述经调整后的色彩校正参数的色彩校正后的各强彩像素点的特征饱和度,对所述色彩增强参数进行调整,使得所述经调整后的色彩校正参数的色彩校正后的各强彩像素点经调整后的色彩增强参数的色彩增强后,所述目标图像的各图像块分别对应的强彩像素点的特征饱和度不过饱和;Adjusting the color enhancement parameter according to the characteristic saturation of each color pixel point after the color correction of the adjusted color correction parameter, so that the color correction of the adjusted color correction parameter is performed after each After the color enhancement of the adjusted color enhancement parameter of the strong color pixel is performed, the characteristic saturation of the corresponding strong color pixel point of each image block of the target image is not saturated;
    根据所述经调整后的色彩增强参数的色彩增强后的各强彩像素点的特征饱和度,对所述色调调整参数进行调整,使得所述经调整后的色彩增强参数的色彩增强后的各强彩像素点经调整后的色调调整参数的色调调整后,所述目标图像的各图像块分别对应的强彩像素点的特征饱和度不过饱和。Adjusting the tone adjustment parameter according to the feature saturation of each of the strong color pixels after the color enhancement of the adjusted color enhancement parameter, so that the color of the adjusted color enhancement parameter is enhanced After the color tone adjustment of the adjusted color tone adjustment parameter of the strong color pixel is performed, the feature saturation of the strong color pixel corresponding to each image block of the target image is not saturated.
  18. 如权利要求15或16所述的装置,其特征在于,所述参数调整模块具体用于:The device according to claim 15 or 16, wherein the parameter adjustment module is specifically configured to:
    根据所述目标图像的各图像块分别对应的强彩像素点的特征饱和度,对所述色彩参数进行调整;Adjusting the color parameter according to a feature saturation of a strong color pixel corresponding to each image block of the target image;
    获取经所述调整后的色彩参数的色彩调整后的各强彩像素点中,对应的特征饱和度高于第一饱和度阈值的强彩像素点的第一像素点数量;Obtaining, in each of the strong color pixels after the color adjustment of the adjusted color parameter, the corresponding number of first pixels of the strong color pixel whose feature saturation is higher than the first saturation threshold;
    当所述第一像素点数量大于或等于第一数量阈值时,降低所述色彩参数,直到所述第一像素点数量小于所述第一数量阈值。When the number of the first pixel points is greater than or equal to the first number threshold, the color parameter is decreased until the number of the first pixel points is less than the first number threshold.
  19. 如权利要求15或16所述的装置,其特征在于,所述参数调整模块具体用于:The device according to claim 15 or 16, wherein the parameter adjustment module is specifically configured to:
    根据所述目标图像的各图像块分别对应的强彩像素点的特征饱和度,对所述色彩参数进行调整;Adjusting the color parameter according to a feature saturation of a strong color pixel corresponding to each image block of the target image;
    获取经所述调整后的色彩参数的色彩调整后的各强彩像素点中,对应的特征饱和度分别处于M个高饱和度范围的强彩像素点的像素点数量;所述M个高饱和度范围为预设的多个饱和度范围从高到低排序后排名前M个的饱和度范围,M为大于1的正整数;Obtaining, in each of the strong color pixels after the color adjustment of the adjusted color parameter, the corresponding feature saturation is respectively in the number of pixels of the strong color pixel points of the M high saturation range; the M high saturation The degree range is a preset plurality of saturation ranges from high to low ranked after the top M saturation ranges, and M is a positive integer greater than one;
    当所述M个高饱和度范围中至少一个目标高饱和度范围对应的像素点数量大于或等于所述目标高饱和度范围对应的第二数量阈值时,降低所述色彩参数,直到所述M个高饱和度范围分别对应的像素点数量均小于所述M个高饱和度范围分别对应的第二数量阈值。When the number of pixel points corresponding to at least one target high saturation range of the M high saturation ranges is greater than or equal to a second quantity threshold corresponding to the target high saturation range, the color parameter is lowered until the M The number of pixels corresponding to each of the high saturation ranges is smaller than the second number threshold corresponding to the M high saturation ranges respectively.
  20. 如权利要求15或16所述的装置,其特征在于,所述参数调整模块具体用于:The device according to claim 15 or 16, wherein the parameter adjustment module is specifically configured to:
    根据所述目标图像的各图像块分别对应的强彩像素点的特征饱和度,对所述色彩参数进行调整;Adjusting the color parameter according to a feature saturation of a strong color pixel corresponding to each image block of the target image;
    获取经所述调整后的色彩参数的色彩调整后的各强彩像素点中,对应的特征饱和度分别处于M个高饱和度范围的强彩像素点的像素点数量以及所述M个高饱和度范围分别对应的权重参数;所述M个高饱和度范围为预设的多个饱和度范围从高到低排序后排名前M个的饱和度范围,M为大于1的正整数;Obtaining, in each of the strong color pixels after the color adjustment of the adjusted color parameter, the corresponding feature saturation is in the number of pixels of the high color saturation pixel of the M high saturation range and the M high saturation The weight ranges respectively correspond to the weight ranges; the M high saturation ranges are preset saturation ranges of the top M after the plurality of saturation ranges are sorted from high to low, and M is a positive integer greater than 1;
    计算第二像素点数量,所述第二像素点数量为各高饱和度范围分别对应的像素点数量与各高饱和度范围对应的权重参数相乘后得到的数值之和;Calculating a number of second pixel points, wherein the number of the second pixel points is a sum of values obtained by multiplying the number of pixels corresponding to each high saturation range by a weight parameter corresponding to each high saturation range;
    当所述第二像素点数量大于或等于第三数量阈值时,降低所述色彩参数,直到所述第二像素点数量小于所述第三数量阈值。When the number of the second pixel points is greater than or equal to the third number threshold, the color parameter is decreased until the number of the second pixel points is less than the third number threshold.
  21. 如权利要求15-20任一项所述的装置,其特征在于,A device according to any of claims 15-20, wherein
    所述获取模块还用于:将所述目标图像的各图像块分别对应的强彩像素点的特征饱和度与第一饱和度阈值比较,确定第三像素点数量,所述第三像素点数量为所述目标图像的各图像块分别对应的强彩像素点中对应的特征饱和度小于所述第一饱和度阈值的强彩像素点的数量;The acquiring module is further configured to: compare a feature saturation of a strong color pixel corresponding to each image block of the target image with a first saturation threshold, and determine a third pixel number, the third pixel number And a number of strong color pixel points corresponding to the first saturation threshold in the strong color pixel corresponding to each image block of the target image;
    所述装置还包括:The device also includes:
    比较模块,用于确定所述第三像素点数量小于第四数量阈值。And a comparing module, configured to determine that the number of the third pixel points is less than a fourth number threshold.
  22. 如权利要求14-21任一项所述的装置,其特征在于,所述获取模块具体用于:The device according to any one of claims 14 to 21, wherein the obtaining module is specifically configured to:
    获取目标图像的各图像块分别对应的像素点中亮度高于第一亮度阈值的至少一个目标像素点;Acquiring at least one target pixel point of the pixel corresponding to each image block of the target image that is higher in brightness than the first brightness threshold;
    从所述至少一个目标像素点中确定出N个高饱和像素点,所述N个高饱和像素点为所述至少一个目标像素点中参考饱和度从高到低排序后排名前N个的目标像素点,N为大于等于1的正整数;Determining N high-saturation pixel points from the at least one target pixel point, wherein the N high-saturation pixel points are the top N target after the reference saturation is sorted from high to low in the at least one target pixel point a pixel, where N is a positive integer greater than or equal to 1;
    根据所述目标图像的各图像块中所述N个高饱和像素点的颜色值,确定所述目标图像的各图像块分别对应的一个强彩像素点的颜色特征值。Determining, according to color values of the N high-saturation pixel points in each image block of the target image, color feature values of a strong color pixel corresponding to each image block of the target image.
  23. 如权利要求22所述的装置,其特征在于,所述获取模块具体用于:The device of claim 22, wherein the obtaining module is specifically configured to:
    获取目标图像的各图像块分别对应的像素点中色相符合第一色相范围和亮度高于第一亮度阈值的至少一个目标像素点。Obtaining, in each pixel block corresponding to each image block of the target image, the hue conforms to the first hue range and the at least one target pixel whose brightness is higher than the first brightness threshold.
  24. 如权利要求23所述的装置,其特征在于,所述获取模块还用于:The device of claim 23, wherein the obtaining module is further configured to:
    获取所述目标图像对应的场景信息;Obtaining scene information corresponding to the target image;
    根据所述目标图像对应的场景信息,确定所述场景信息对应的待调整的所述第一色相范围。Determining, according to the scene information corresponding to the target image, the first hue range to be adjusted corresponding to the scene information.
  25. 如权利要求11-24任一项所述的装置,其特征在于,所述参考饱和度为饱和度;或,所述参考饱和度为饱和度与亮度共同确定的综合值。The apparatus according to any one of claims 11 to 24, wherein the reference saturation is saturation; or the reference saturation is a combined value determined by saturation and luminance.
  26. 如权利要求11-25任一项所述的装置,其特征在于,所述获取模块具体用于:The device according to any one of claims 11 to 25, wherein the obtaining module is specifically configured to:
    当N等于1时,确定所述目标图像的各图像块对应的一个高饱和像素点的颜色值为所述目标图像的各图像块分别对应的一个强彩像素点的颜色特征值;When N is equal to 1, determining that a color value of a high-saturation pixel corresponding to each image block of the target image is a color feature value of a strong color pixel corresponding to each image block of the target image;
    当N大于1时,分别计算所述目标图像的各图像块对应的N个高饱和像素点的颜色值的平均值;确定所述目标图像的各图像块对应的N个高饱和像素点的颜色值的平均值为所述目标图像的各图像块分别对应的一个强彩像素点的颜色特征值。When N is greater than 1, respectively, calculating an average value of color values of N high-saturation pixel points corresponding to each image block of the target image; determining color of N high-saturation pixel points corresponding to each image block of the target image The average value of the values is a color feature value of one strong color pixel corresponding to each image block of the target image.
  27. 一种图像色彩调整装置,其特征在于,包括:An image color adjustment device, comprising:
    存储器,用于存储程序;Memory for storing programs;
    处理器,用于执行所述存储器存储的所述程序,当所述程序被执行时,所述处理器用于执行如权利要求1-13中任一所述的步骤。A processor for executing the program stored by the memory, the processor for performing the steps of any of claims 1-13 when the program is executed.
  28. 一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得计算机执行如权利要求1-13任意一项所述的方法。A computer readable storage medium comprising instructions which, when executed on a computer, cause the computer to perform the method of any of claims 1-13.
PCT/CN2019/075780 2018-03-09 2019-02-22 Image color adjustment method and device WO2019170007A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810199400.8A CN110248170B (en) 2018-03-09 2018-03-09 Image color adjusting method and device
CN201810199400.8 2018-03-09

Publications (1)

Publication Number Publication Date
WO2019170007A1 true WO2019170007A1 (en) 2019-09-12

Family

ID=67846403

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/075780 WO2019170007A1 (en) 2018-03-09 2019-02-22 Image color adjustment method and device

Country Status (2)

Country Link
CN (1) CN110248170B (en)
WO (1) WO2019170007A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113436284A (en) * 2021-07-30 2021-09-24 上海商汤智能科技有限公司 Image processing method and device, computer equipment and storage medium
CN113658287A (en) * 2021-07-14 2021-11-16 支付宝(杭州)信息技术有限公司 User interface color matching processing method, device and equipment

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111127476B (en) * 2019-12-06 2024-01-26 Oppo广东移动通信有限公司 Image processing method, device, equipment and storage medium
CN113556525B (en) * 2020-04-23 2023-08-15 深圳市万普拉斯科技有限公司 Color temperature adjusting method, device, computer equipment and storage medium
CN113361315B (en) * 2021-02-23 2021-12-07 仲恺农业工程学院 Banana string identification method based on background saturation compression and difference threshold segmentation fusion
CN113115085A (en) * 2021-04-16 2021-07-13 海信电子科技(武汉)有限公司 Video playing method and display equipment
TWI796922B (en) * 2022-01-04 2023-03-21 宏碁股份有限公司 Image chromatic aberration removal method, image processing device and image processing system
CN117119316A (en) * 2023-10-25 2023-11-24 荣耀终端有限公司 Image processing method, electronic device, and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020171752A1 (en) * 2001-05-18 2002-11-21 Baer Richard L. Apparatus and method for reducing saturation artifacts in digital images captured using frame-transfer CCD sensor with reduced-height storage area
CN101453546A (en) * 2007-12-07 2009-06-10 瑞昱半导体股份有限公司 Image saturation detection and regulation apparatus
CN101719359A (en) * 2008-10-09 2010-06-02 华硕电脑股份有限公司 Method for regulating color distribution and color distribution module
CN102244790A (en) * 2011-06-27 2011-11-16 展讯通信(上海)有限公司 Device and method for adaptively adjusting supporting parameters of image signal processor
CN104980718A (en) * 2014-04-04 2015-10-14 采钰科技股份有限公司 Color correction devices and methods

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106034231B (en) * 2015-03-11 2018-02-09 杭州海康威视数字技术股份有限公司 The method of adjustment and its system of color saturation of image
JP6611543B2 (en) * 2015-10-05 2019-11-27 キヤノン株式会社 Image processing apparatus, image processing method, and program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020171752A1 (en) * 2001-05-18 2002-11-21 Baer Richard L. Apparatus and method for reducing saturation artifacts in digital images captured using frame-transfer CCD sensor with reduced-height storage area
CN101453546A (en) * 2007-12-07 2009-06-10 瑞昱半导体股份有限公司 Image saturation detection and regulation apparatus
CN101719359A (en) * 2008-10-09 2010-06-02 华硕电脑股份有限公司 Method for regulating color distribution and color distribution module
CN102244790A (en) * 2011-06-27 2011-11-16 展讯通信(上海)有限公司 Device and method for adaptively adjusting supporting parameters of image signal processor
CN104980718A (en) * 2014-04-04 2015-10-14 采钰科技股份有限公司 Color correction devices and methods

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113658287A (en) * 2021-07-14 2021-11-16 支付宝(杭州)信息技术有限公司 User interface color matching processing method, device and equipment
CN113658287B (en) * 2021-07-14 2024-05-03 支付宝(杭州)信息技术有限公司 User interface color matching processing method, device and equipment
CN113436284A (en) * 2021-07-30 2021-09-24 上海商汤智能科技有限公司 Image processing method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN110248170A (en) 2019-09-17
CN110248170B (en) 2022-04-05

Similar Documents

Publication Publication Date Title
WO2019170007A1 (en) Image color adjustment method and device
US20060204124A1 (en) Image processing apparatus for correcting contrast of image
CN104954771B (en) Carry out the image processing equipment and image processing method of color range correction
US20200051225A1 (en) Fast Fourier Color Constancy
JP2015156615A (en) Image processing system, image processing method, control program, and recording medium
US20110135202A1 (en) Image processing apparatus and image processing method
WO2022253014A1 (en) Underwater image color restoration method and apparatus
CN103647958A (en) Image processing method and device and electronic device
WO2018100950A1 (en) Image processing device, digital camera, image processing program, and recording medium
CN111587573B (en) Image processing method and device and computer storage medium
WO2021051307A1 (en) Image color calibration method, camera devices, and image color calibration system
JP2003102031A (en) Image processing method, image processing apparatus, method for evaluation imaging device, image information storage method, image processing system, and data structure in image data file
CN117014733A (en) Shooting correction method, device and equipment
US20230222639A1 (en) Data processing method, system, and apparatus
US9854218B2 (en) Electronic system and image processing method
JP2007228221A (en) Imaging apparatus, image processing apparatus, image processing method and image processing program
US20230342977A1 (en) Method for Determining Chromaticity Information and Related Electronic Device
CN112950509B (en) Image processing method and device and electronic equipment
US20140118574A1 (en) Method for white balance adjustment of images
US7359100B2 (en) Image correction method, program, and apparatus
US9172934B2 (en) Method for white balance adjustment of images
US8953063B2 (en) Method for white balance adjustment
JP2007288245A (en) Imaging apparatus, image processing method, and image processing program
JP2015041856A (en) Image processing device, imaging device, and program
JP2015142281A (en) Subject searching device, control method and control program of the same, and imaging device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19764108

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19764108

Country of ref document: EP

Kind code of ref document: A1