Search

CN-120219236-B - Color enhancement method, device, equipment and storage medium

CN120219236BCN 120219236 BCN120219236 BCN 120219236BCN-120219236-B

Abstract

The disclosure provides a color enhancement method, a device, equipment and a storage medium, and relates to the technical field of image processing. The method comprises the steps of obtaining color index values of each pixel point in an image to be processed, corresponding to each dimension, traversing a first preset color lookup table LUT associated with each dimension based on the color index values of each pixel point in the dimension to obtain a target type of a memory color corresponding to the pixel point, traversing a second preset LUT according to the target type of the memory color of each pixel point and the corresponding color index value to obtain color adjustment quantity corresponding to the pixel point, and carrying out color adjustment on each pixel point based on the color adjustment quantity corresponding to each pixel point to obtain a target image after color enhancement. Therefore, when the color of the image to be processed is enhanced, the target image can meet the requirement of the user on the color through the memory color enhancement, and the user experience is improved.

Inventors

  • LI WANQI

Assignees

  • 上海玄戒技术有限公司

Dates

Publication Date
20260508
Application Date
20231226

Claims (11)

  1. 1. A method of color enhancement, comprising: acquiring color index values corresponding to each pixel point in each dimension in an image to be processed; acquiring a reference data set, wherein the reference data set comprises a plurality of groups of source data, target data, masks and memory color types corresponding to the target data which are mutually related; Counting the target data associated with the types of the same memory color to obtain the target distribution characteristics of the target data associated with the types of the same memory color in each dimension; Counting the source data associated with the types of the same memory color to obtain the source distribution characteristics of the source data associated with the types of the same memory color in each dimension; Determining a color transmission mode when each source distribution feature is converted into an associated target distribution feature according to a preset cost function, wherein the color transmission mode comprises a second color index value in the source distribution feature and a first color index value corresponding to the source distribution feature; generating a first preset color lookup table LUT and a second preset LUT according to the transmission mode; Traversing a first preset color lookup table LUT associated with each dimension based on a color index value of each pixel point in each dimension to obtain a target type of the memory color corresponding to the pixel point; traversing the second preset LUT according to the target type of the memory color and the corresponding color index value of each pixel point to obtain the corresponding color adjustment quantity of the pixel point; and carrying out color adjustment on each pixel point based on the corresponding color adjustment amount of each pixel point so as to obtain a target image after color enhancement.
  2. 2. The method of claim 1, wherein traversing the first preset color look-up table LUT associated with each dimension based on the color index value of the pixel in the dimension to obtain the target type of the memory color corresponding to the pixel comprises: traversing a first preset LUT associated with each dimension based on the color index value of each pixel point in each dimension to acquire probability values of different types of memory colors corresponding to the pixel points in the dimension; and determining the target type of the memory color corresponding to the pixel point according to the probability values of the memory colors of the pixel point corresponding to different types under each dimension.
  3. 3. The method of claim 2, wherein determining the target type of the memory color corresponding to the pixel according to the probability value of the memory color corresponding to the pixel in each dimension comprises: multiplying probability values of the pixel points corresponding to different types of memory colors in each dimension to determine a total probability value of the pixel points corresponding to each type of memory colors; And determining the target type of the memory color corresponding to the pixel point according to the total probability value of the pixel point belonging to each type of memory color.
  4. 4. The method of claim 1, wherein traversing the second preset LUT according to the target type of the memory color to which the pixel belongs and the corresponding color index value to obtain the color adjustment amount corresponding to the pixel comprises: Traversing a second preset LUT associated with the tone dimension based on a color index value corresponding to the tone dimension of the pixel point and the target type to obtain a first color adjustment quantity; and traversing a second preset LUT associated with the saturation dimension based on a color index value corresponding to the pixel point in the saturation dimension and the target type to obtain a second color adjustment amount.
  5. 5. The method of claim 1, further comprising, after the acquiring the reference data set: and aligning the brightness of the target data with the brightness of the source data based on an optimal distance transmission algorithm.
  6. 6. The method of claim 1, wherein generating a first preset color look-up table LUT according to the color transmission mode comprises: in case that any second color index value is different from the corresponding first color index value, determining that the probability value corresponding to the first color index value in the first preset LUT is 1, or And under the condition that any second color index value is the same as the corresponding first color index value, determining that the probability value corresponding to the first color index value in the first preset LUT is 0.
  7. 7. The method of claim 6, wherein generating the second preset LUT comprises: determining a difference value between any one of the second color index values and the corresponding first color index value under the condition that the any one of the second color index values is different from the corresponding first color index value; and determining the color adjustment amount corresponding to any one of the second color index values in the second preset LUT based on the difference value.
  8. 8. The method of claim 6, wherein the counting the target data associated with the same memory color type to obtain the target distribution characteristics of the target data associated with the same memory color type in each dimension comprises: Acquiring a histogram of each target data associated with the type of the same memory color in each dimension; determining differences between each of the histograms and the remaining histograms; Determining a second weight of each histogram according to the corresponding difference of each histogram; And based on the second weight, fusing a plurality of histograms associated with the same memory color type in each dimension to obtain the target distribution characteristics of the same memory color type in the dimension.
  9. 9. A color enhancement device, comprising: The first acquisition module is used for acquiring color index values corresponding to each pixel point in each dimension in the image to be processed; the method comprises the steps of obtaining a reference data set, wherein the reference data set comprises a plurality of groups of source data, target data, masks and types of memory colors corresponding to the target data which are associated with each other, counting the target data which are associated with the types of the same memory colors to obtain target distribution characteristics of the target data which are associated with the types of the same memory colors in each dimension, counting the source data which are associated with the types of the same memory colors to obtain source distribution characteristics of the source data which are associated with the types of the same memory colors in each dimension, determining a color transmission mode when each source distribution characteristic is converted into the associated target distribution characteristics according to a preset cost function, wherein the color transmission mode comprises a second color index value in the source distribution characteristics and a first color index value corresponding to the target distribution characteristics, and generating a first preset color lookup table LUT and a second preset LUT according to the transmission mode; The second acquisition module is used for traversing a first preset color lookup table LUT associated with each dimension based on the color index value of each pixel point in each dimension so as to acquire the target type of the memory color corresponding to the pixel point; A third obtaining module, configured to traverse the second preset LUT according to a target type of the memory color to which each pixel point belongs and a corresponding color index value, so as to obtain a color adjustment amount corresponding to the pixel point; and a fourth acquisition module, which is used for carrying out color adjustment on each pixel point based on the corresponding color adjustment amount of each pixel point so as to acquire the target image after color enhancement.
  10. 10. An electronic device comprising a processor and a memory communicatively coupled to the processor; The memory stores computer-executable instructions; The processor executes computer-executable instructions stored in the memory to implement the method of any one of claims 1-8.
  11. 11. A computer readable storage medium having stored therein computer executable instructions which when executed by a processor are adapted to carry out the method of any one of claims 1-8.

Description

Color enhancement method, device, equipment and storage medium Technical Field The disclosure relates to the technical field of image processing, and in particular relates to a color enhancement method, a device, equipment and a storage medium. Background Memory color enhancement is a particular sub-area in image processing that is primarily focused on enhancing the color of objects for which a person desires a fixed color, such as sky, green plants, and human skin tone. The colors of these objects have a "desired" color in the memory of the person, so enhancing these colors can make the image more desirable to the person's vision. In the related art, modeling of a skin color model can be realized through an ellipse model so as to detect and enhance the skin color, but the model has no universality on migration of other memory colors, and the hardware cost of the ellipse model is large, so that hardening is difficult. Disclosure of Invention The present disclosure provides a color enhancement method, apparatus, device, and storage medium, which aim to solve at least one of the technical problems in the related art to some extent. In a first aspect, the present disclosure provides a color enhancement method comprising: acquiring color index values corresponding to each pixel point in each dimension in an image to be processed; Traversing a first preset color lookup table LUT associated with each dimension based on a color index value of each pixel point in each dimension to obtain a target type of the memory color corresponding to the pixel point; Traversing a second preset LUT according to the target type of the memory color and the corresponding color index value of each pixel point to obtain the corresponding color adjustment quantity of the pixel point; and carrying out color adjustment on each pixel point based on the corresponding color adjustment amount of each pixel point so as to obtain a target image after color enhancement. In a second aspect, the present disclosure provides a color enhancement device comprising: the first acquisition module is used for acquiring color index values corresponding to each pixel point in each dimension in the image to be processed; The second acquisition module is used for traversing a first preset color lookup table LUT associated with each dimension based on the color index value of each pixel point in each dimension so as to acquire the target type of the memory color corresponding to the pixel point; a third obtaining module, configured to traverse a second preset LUT according to a target type of the memory color to which each pixel point belongs and a corresponding color index value, so as to obtain a color adjustment amount corresponding to the pixel point; and a fourth acquisition module, which is used for carrying out color adjustment on each pixel point based on the corresponding color adjustment amount of each pixel point so as to acquire the target image after color enhancement. In a third aspect, the present disclosure provides an electronic device comprising a processor, a memory for storing processor-executable instructions, wherein the processor is configured to execute the instructions to implement a color enhancement method. In a fourth aspect, the present disclosure provides a computer-readable storage medium, which when executed by a processor of an electronic device, enables the electronic device to perform a color enhancement method. In a fifth aspect, the present disclosure provides a computer program product comprising a computer program for performing a color enhancement method by a processor. In the embodiment of the disclosure, first, a color index value corresponding to each pixel point in each dimension in an image to be processed is obtained, a first preset color lookup table LUT associated with each dimension is traversed based on the color index value of each pixel point in each dimension to obtain a target type of a memory color corresponding to the pixel point, a second preset LUT is traversed according to the target type of the memory color corresponding to each pixel point and the corresponding color index value to obtain a color adjustment amount corresponding to the pixel point, and color adjustment is performed on each pixel point based on the color adjustment amount corresponding to each pixel point to obtain a color-enhanced target image. Therefore, the color enhancement problem can be resolved into the problem which can be solved by the color lookup table, the calculation and storage efficiency is improved, the efficiency is higher than that of a deep learning mode, and the color enhancement scheme suitable for the image to be processed can be determined in a short time. Additional aspects and advantages of the disclosure will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the disclosure. Drawings The accompanying drawings, which are in