Method, apparatus, device, and computer-readable storage medium for color adjustment of an image

By identifying target pixels and candidate regions within images and calculating average color values, the method improves color adjustment accuracy, addressing inaccuracies in deep learning-based methods and reducing flickering in video playback.

CN114820365BActive Publication Date: 2025-07-15MIGU CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210436212.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-24
Publication Date
2025-07-15
Estimated Expiration
2042-04-24

AI Technical Summary

Technical Problem

During the training of deep learning models, the training samples obtained are limited, resulting in inaccurate adjustments during image color adjustment.

Method used

By determining the target pixel of the image to be processed and the candidate area with strong light, the average color values of the candidate area and the target pixel are calculated, the color adjustment coefficient is determined based on these average color values, and the image color is adjusted based on the coefficient.

Benefits of technology

Improve the accuracy of image color adjustment, avoid video image flickering caused by single algorithm adjustment, and improve user's visual experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114820365B_ABST
    Figure CN114820365B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, equipment and computer-readable storage medium for adjusting the color of an image. The method comprises: determining an image to be processed, determining a target pixel of the image to be processed; determining a candidate area with strong light in the image to be processed; determining a first average color value of pixels in the candidate area, and determining a second average color value of the target pixel; determining a color adjustment coefficient of the image to be processed according to the first average color value and the second average color value; and adjusting the image to be processed based on the color adjustment coefficient. The accuracy of adjusting the color of the picture is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and particularly to a method, apparatus, device and computer-readable storage medium for color adjustment of images. Background Art

[0002] Image Processing technology refers to analyzing images through various pixel processing means so that the processed images can achieve preset effects, meet different visual needs of users, and bring good visual experiences to users.

[0003] For the color adjustment method of images, deep learning technology is often used to generate pictures and adjust the areas with weak light intensity in each picture. However, during the process of training the deep learning model, the obtained training samples are limited, resulting in the inability to comprehensively obtain pictures under different light intensities. That is, when adjusting the color of pictures through deep learning, there is a problem of inaccurate adjustment. Summary of the Invention

[0004] The main purpose of the present invention is to provide a method, apparatus, device and computer-readable storage medium for color adjustment of images, aiming to improve the accuracy of adjusting the color of pictures.

[0005] To achieve the above purpose, a method for color adjustment of images provided by the present invention includes the following steps:

[0006] Determine the image to be processed and determine the target pixel of the image to be processed;

[0007] Determine the candidate area with stronger light in the image to be processed;

[0008] Determine the first average color value of the pixels in the candidate area and determine the second average color value of the target pixel;

[0009] Determine the color adjustment coefficient of the image to be processed according to the first average color value and the second average color value;

[0010] Adjust the image to be processed based on the color adjustment coefficient.

[0011] Optionally, the step of determining the target pixel of the image to be processed includes:

[0012] Obtain the chromaticity values of the pixels in the image to be processed;

[0013] Determine the average value and standard deviation of the chromaticity values of the pixels in the image to be processed according to the chromaticity values and the number of pixels;

[0014] Determine an adjustment coefficient corresponding to the average value;

[0015] Obtain the target pixel of the image to be processed according to the average value, the standard deviation, and the adjustment coefficient.

[0016] Optionally, the step of determining the first average color value of the pixels in the candidate region and determining the second average color value of the target pixel includes:

[0017] Obtain the color values of the pixels in the candidate region;

[0018] Determine the first average color value of the candidate region according to the color values of the pixels and the number of the pixels;

[0019] Obtain the color value of the target pixel and the number of the target pixels;

[0020] Obtain the second average color value according to the color value of the target pixel and the number of the target pixels.

[0021] Optionally, the step of determining the candidate region with stronger light in the image to be processed includes:

[0022] Determine the average value of the brightness of the image to be processed and the standard deviation of the brightness;

[0023] Determine the candidate region according to the brightness, the standard deviation, the average value, and the region percentage.

[0024] Optionally, after the step of determining the image to be processed, it further includes:

[0025] When the image to be processed is a video image, obtain the frame sequence of the image to be processed;

[0026] Determine the color adjustment coefficient of the image to be processed according to the frame sequence, and adjust the image to be processed based on the color adjustment coefficient.

[0027] Optionally, the step of determining the color adjustment coefficient of the image to be processed according to the frame sequence includes:

[0028] Determine whether the image to be processed belongs to a video image within the range of the previous color adjustment coefficient according to the frame sequence;

[0029] If so, determine the previous color adjustment coefficient as the color adjustment coefficient of the image to be processed;

[0030] If not, determine the target video image according to the frame sequence, and obtain the color adjustment coefficient of the image to be processed according to the target video image, where there are multiple target images.

[0031] Optionally, the step of obtaining the color adjustment coefficient of the image to be processed according to the target video image includes:

[0032] Obtaining the third average color value of the pixels in the candidate regions of each target video image;

[0033] Screening target pixels in each target video image to obtain the fourth average color value of the target pixels in multiple target video images;

[0034] Obtaining the color adjustment coefficient of the video image according to the third average color value and the fourth average color value.

[0035] To achieve the above object, the present invention further provides an image color adjustment method device, and the image color adjustment method device includes:

[0036] A pixel determination module, configured to determine an image to be processed and determine the target pixels of the image to be processed;

[0037] A candidate region determination module, configured to determine a candidate region with stronger light in the image to be processed;

[0038] An average color value determination module, configured to determine the first average color value of the pixels in the candidate region and determine the second average color value of the target pixels;

[0039] An adjustment coefficient determination module, configured to determine the color adjustment coefficient of the image to be processed according to the first average color value and the second average color value;

[0040] An adjustment module, configured to adjust the image to be processed based on the color adjustment coefficient.

[0041] To achieve the above object, the present invention further provides an image color adjustment device, and the image color adjustment device includes a memory, a processor, and an image color adjustment program stored in the memory and executable on the processor. When the image color adjustment program is executed by the processor, it implements each step of the above-mentioned image color adjustment method.

[0042] To achieve the above object, the present invention further provides a computer-readable storage medium, and the computer-readable storage medium stores an image color adjustment program. When the image color adjustment program is executed by a processor, it implements each step of the above-mentioned image color adjustment method.

[0043] A method, device, equipment and computer-readable storage medium for color adjustment of an image provided by the present invention determine an image to be processed, determine a target pixel of the image to be processed, further determine a candidate area with strong light in the image to be processed, determine a first average color value of pixels in the candidate area, and a second average color value of the target pixel, determine a color adjustment coefficient of the image to be processed according to the first average color value and the second average color value, and adjust the image to be processed based on the color adjustment coefficient. It can adjust the color of the image to be processed according to the first average color value and the second average color value of the candidate area with strong light in the currently acquired image to be processed, improving the accuracy of color adjustment. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 FIG. is a schematic hardware structure diagram of an image color adjustment device according to an embodiment of the present invention;

[0045] Figure 2 FIG. is a schematic flowchart of a first embodiment of the image color adjustment method of the present invention;

[0046] Figure 3 FIG. is a schematic diagram showing that the brightness distribution function of pixels in the image color adjustment method of the present invention satisfies a normal distribution;

[0047] Figure 4 FIG. is a schematic diagram of the effect of the image color adjustment method of the present invention;

[0048] Figure 5 FIG. is a schematic diagram of modules of the image color adjustment method of the present invention.

[0049] The realization, functional features and advantages of the object of the present invention will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0050] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0051] The main solution of the embodiment of the present invention is: determine an image to be processed, and determine the target pixel of the image to be processed; determine the candidate area with strong light in the image to be processed; determine the first average color value of the pixels in the candidate area, and determine the second average color value of the target pixel; determine the color adjustment coefficient of the image to be processed according to the first average color value and the second average color value; adjust the image to be processed based on the color adjustment coefficient.

[0052] As an implementation solution, the image color adjustment device can be as Figure 1 shown.

[0053] The solution of the embodiment of the present invention relates to an image color adjustment device, and the image color adjustment device includes: a processor 101, such as a CPU, a memory 102, and a communication bus 103. Among them, the communication bus 103 is used to realize the connection and communication between these components.

[0054] The memory 102 can be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. As Figure 1 shown, the memory 102, as a computer-readable storage medium, may include an image color adjustment program; and the processor 101 can be used to call the image color adjustment program stored in the memory 102 and perform the following operations:

[0055] Determine the image to be processed and determine the target pixel of the image to be processed;

[0056] Determine the candidate area with stronger light in the image to be processed;

[0057] Determine the first average color value of the pixels in the candidate area and determine the second average color value of the target pixel;

[0058] Determine the color adjustment coefficient of the image to be processed according to the first average color value and the second average color value;

[0059] Adjust the image to be processed based on the color adjustment coefficient.

[0060] In an embodiment, the processor 101 can be used to call the image color adjustment program stored in the memory 102 and perform the following operations:

[0061] Obtain the chromaticity values of the pixels in the image to be processed;

[0062] Determine the average value and standard deviation of the chromaticity values of the pixels in the image to be processed according to the chromaticity values and the number of pixels;

[0063] Determine the adjustment coefficient corresponding to the average value;

[0064] Obtain the target pixel of the image to be processed according to the average value, the standard deviation, and the adjustment coefficient.

[0065] In an embodiment, the processor 101 can be used to call the image color adjustment program stored in the memory 102 and perform the following operations:

[0066] Obtain the color values of the pixels in the candidate area;

[0067] Determine the first average color value of the candidate area according to the color values of the pixels and the number of pixels;

[0068] Obtain the color value of the target pixel and the number of the target pixels;

[0069] Obtain the second average color value according to the color value of the target pixel and the number of the target pixels.

[0070] In one embodiment, the processor 101 can be used to call the color adjustment program of the image stored in the memory 102 and perform the following operations:

[0071] Determine the average value of the brightness of the image to be processed and the standard deviation of the brightness;

[0072] Determine the candidate region according to the brightness, the standard deviation, the average value and the region percentage.

[0073] In one embodiment, the processor 101 can be used to call the color adjustment program of the image stored in the memory 102 and perform the following operations:

[0074] When the image to be processed is a video image, obtain the frame sequence of the image to be processed;

[0075] Determine the color adjustment coefficient of the image to be processed according to the frame sequence, and adjust the image to be processed based on the color adjustment coefficient.

[0076] In one embodiment, the processor 101 can be used to call the color adjustment program of the image stored in the memory 102 and perform the following operations:

[0077] Determine whether the image to be processed belongs to the video image within the range of the previous color adjustment coefficient according to the frame sequence;

[0078] If so, determine the previous color adjustment coefficient as the color adjustment coefficient of the image to be processed;

[0079] If not, determine the target video image according to the frame sequence, and obtain the color adjustment coefficient of the image to be processed according to the target video image, where there are multiple target images.

[0080] In one embodiment, the processor 101 can be used to call the color adjustment program of the image stored in the memory 102 and perform the following operations:

[0081] Obtain the third average color value of the pixels in the candidate region of each target video image;

[0082] Filter the target pixels in each target video image to obtain the fourth average color value of the target pixels in multiple target video images;

[0083] Obtain the color adjustment coefficient of the video image according to the third average color value and the fourth average color value.

[0084] Image Processing technology refers to analyzing an image through various pixel processing means so that the processed image reaches a preset effect, meets different visual needs of users, and brings a good visual experience to users. For the method of adjusting the color of an image, deep learning technology is often used to generate pictures and adjust the areas with weak light intensity in each picture. However, during the process of training the deep learning model, the obtained training samples are limited, resulting in the inability to comprehensively obtain pictures under different light intensities, that is, when adjusting the color of pictures through deep learning, there is a problem of inaccurate adjustment.

[0085] Refer to Figure 2 , Figure 2 For the first embodiment of the method for adjusting the color of the image of the present invention, the method for adjusting the color of the image includes the following steps:

[0086] Step S10, determine the image to be processed and determine the target pixel of the image to be processed;

[0087] Step S20, determine the candidate area with stronger light in the image to be processed;

[0088] Step S30, determine the first average color value of the pixels in the candidate area and determine the second average color value of the target pixel;

[0089] Step S40, determine the color adjustment coefficient of the image to be processed according to the first average color value and the second average color value;

[0090] Step S50, adjust the image to be processed based on the color adjustment coefficient.

[0091] The execution subject of this application is a device for adjusting the color of an image.

[0092] The device for adjusting the color of an image obtains the YUV data information of the image to be processed, where "Y" represents luminance; and "U" and "V" represent chrominance values, which are used to describe the color and saturation of the image. In this embodiment, the average color value is the value obtained after averaging the color value components (red, blue, green) of each pixel.

[0093] The image to be processed can be an image that needs to be color-adjusted, which can be obtained locally or online. For example, receive an image sent by a WeChat friend.

[0094] In this embodiment, when the image to be processed is obtained, the chromaticity values of the pixels in the image to be processed are determined, the target pixels are determined according to the chromaticity values, and further, the average color value of the pixels in the candidate region is calculated as the first average color value, and the average color value of the target pixels is calculated as the second average color value. Among them, the area with stronger light can be an area formed by a combination of multiple pixels with pixel brightness greater than the preset brightness in the image to be processed.

[0095] Optionally, in this embodiment, when determining the target pixels of the image to be processed, the chromaticity values of the pixels in the image to be processed can be obtained first. When obtaining the target pixels of the image to be processed according to the chromaticity values, the average value, standard deviation, and adjustment coefficient, formula 2: |U(i, j) – (Mu + Du)| < Xu * Du; and formula 3: |V(i, j) – (Mv + Dv)| < Xv * Dv can be used to obtain the target pixels.

[0096] Where: U(i, j) and V(i, j) represent the chromaticity values (uv) corresponding to the pixel point (i, j) in yuv, Mu and Mv represent the average values of the U and V chromaticity values of the current frame, Du and Dv respectively represent the standard deviations. Xu and Xv represent the adjustment coefficients calculated according to the corresponding Mu and Mv.

[0097] Pixels that satisfy both formula 2 and formula 3 are obtained as the target pixels.

[0098] Optionally, in this embodiment, pixels with color values ranked in the top 10% can also be obtained from the pixels that satisfy both formula 2 and formula 3 as the target pixels.

[0099] In this embodiment, by screening pixels whose chromaticity values meet the preset requirements as the target pixels, it provides a basis for the accuracy of determining the color adjustment coefficient.

[0100] Optionally, in this embodiment, first, the area with stronger pixel brightness in the image to be processed can be determined. The brightness of the image to be processed can be obtained first, and the pixels with higher brightness values are determined to form the candidate region, and then the first average color value of the candidate region is obtained.

[0101] Optionally, in this embodiment, the average value of the chromaticity values of the image to be processed and the standard deviation of the chromaticity values can also be obtained, and then the candidate region is determined according to the chromaticity values, the standard deviation, the average value, and the regional percentage.

[0102] Exemplarily, in this embodiment, the distribution function of the pixel brightness satisfies the normal distribution, as Figure 3 shown.

[0103] In Figure 3The horizontal axis represents the brightness of pixels, the vertical axis represents the pixel density, and 0 on the horizontal axis represents the average brightness.

[0104] The square area represents the candidate pixel standard under average conditions. The two regions surrounded by two solid lines perpendicular to the horizontal axis are the candidate regions for image brightness adjustment.

[0105] The candidate region is determined by formula 1: |U—(M+D)|<X*D, where:

[0106] U represents the brightness of the pixel.

[0107] M represents the average brightness of all pixels in the whole image to be processed;

[0108] D represents the standard deviation of the brightness of all pixels in the whole image to be processed;

[0109] X is an adjustment coefficient; among them, the adjustment coefficient is used to adjust the size of the candidate region so that the finally obtained candidate region accounts for about 75% of the whole image.

[0110] Optionally, X = 1.5+(100-M) / 200, s.t:M = max(M, 200), that is, the candidate region is adjusted according to the brightness of the image. The darker the image, the larger the candidate region required. The final boundary is shown as the region surrounded by two solid lines perpendicular to the horizontal axis.

[0111] In this embodiment, the candidate region with stronger light is determined according to the brightness, the standard deviation, the average value and the region percentage, and the candidate region is accurately determined.

[0112] Optionally, in this embodiment, after the candidate region is determined, the color value of the pixels in the candidate region is obtained, and the first average color value of the candidate region is determined according to the color value of the pixels and the number of pixels.

[0113] Exemplarily, in this embodiment, there are n pixels in the candidate region, where n belongs to positive integers. The color values (R0, G0, B0), (R2, G2, B2), (R2, G2, B2), (R3, G3, B3), ……, (Rn, Gn, Bn) of each pixel are obtained respectively. Then the first average color value is the average value of (R0, G0, B0), (R2, G2, B2), (R2, G2, B2), (R3, G3, B3), ……, (Rn, Gn, Bn). In this embodiment, the first average color value of the candidate region is determined through the color value of the pixels and the number of pixels, and the first average color value is quickly determined.

[0114] Furthermore, in this embodiment, the second average color is obtained through the color value and the number of small face pixels.

[0115] For example, there are m target pixels in the image to be processed, where m belongs to positive integers. The color values (R0, G0, B0), (R2, G2, B2), (R2, G2, B2), (R3, G3, B3), ……, (Rm, Gm, Bm) of each target pixel are obtained respectively. Then, the average value (the second average color value) of the color values of the target pixels in the image to be processed is the average value of the sum of (R0, G0, B0), (R2, G2, B2), (R2, G2, B2), (R3, G3, B3), ……, (Rn, Gn, Bn).

[0116] Furthermore, the second average color value is determined according to the color values and the quantity of the target pixels. It can be understood that the step of determining the second average color value according to the color values and the quantity of the target pixels is the same as the step of determining the first average color value of the candidate region according to the color values of the pixels in the candidate region and the quantity of the pixels, and thus this application will not describe it in detail.

[0117] After determining the first average color value (R0, G0, B0) and the second average color value (Rw, Gw, Bw), the color adjustment coefficient can be determined according to the ratio of the first average color value to the second average color value.

[0118] Exemplarily, for example, the top 10% of the pixels in red that satisfy both Formula 2 and Formula 3 are selected as the white point estimation pixels (target pixels) for red. The average value of the white point estimation pixels for red is used as Rw, and the color adjustment coefficient for red Ar = Rw / R0 is obtained.

[0119] The top 10% of the pixels in green that satisfy the above conditions are selected as the white point estimation pixels for green. The average value of the white point estimation pixels for green is used as Gw, and the color adjustment coefficient for green Ag = Gw / G0 is obtained.

[0120] The top 10% of the pixels in blue that satisfy the above conditions are selected as the white point estimation pixels for blue. The average value of the white point estimation pixels for blue is used as Bw, and the color adjustment coefficient for blue Ab = Bw / B0 is obtained.

[0121] Furthermore, the color value components corresponding to each pixel in the image to be processed are adjusted according to each color adjustment coefficient, and the adjusted image to be processed is obtained.

[0122] It can be understood that in this embodiment, after adjusting the image to be processed according to the color adjustment coefficient, the color of the image is enhanced. Further, the color brightness of the image is also enhanced. The schematic diagrams before and after the adjustment are as Figure 4 shown.

[0123] In this embodiment, an image to be processed is determined, the chromaticity value of a candidate area with stronger light in the image to be processed is determined, the target pixel is determined according to the chromaticity value, and then the first average color value of the pixel in the candidate area and the second average color value of the target pixel in the image to be processed are determined, the color adjustment coefficient of the image to be processed is determined according to the first average color value and the second average color value, and the image to be processed is adjusted based on the color adjustment coefficient. The color of the image to be processed can be adjusted according to the first average color value and the second average color value of the candidate area with stronger light in the image to be processed currently acquired, thereby improving the accuracy of color adjustment.

[0124] Referring to the previous embodiment, the present application proposes another embodiment. After the step of determining the image to be processed, the method further includes:

[0125] Step S50, when the image to be processed is a video image, obtaining a frame sequence of the image to be processed;

[0126] Step S60: determining a color adjustment coefficient of the image to be processed according to the frame sequence, and adjusting the image to be processed based on the color adjustment coefficient.

[0127] In this embodiment, when it is determined that the image to be processed is a video image, the frame sequence of the image to be processed is obtained, and then the color adjustment coefficient of the image to be processed is determined according to the frame sequence.

[0128] Optionally, it is determined whether the image to be processed belongs to a video image within the adjustment range of the previous color adjustment coefficient according to the frame sequence. If so, the previous color adjustment coefficient is determined to be the color adjustment coefficient of the image to be processed; if not, a target video image is determined according to the frame sequence, and the color adjustment coefficient of the video image is obtained according to the target image, wherein there are multiple target images.

[0129] For example, in this embodiment, it can be determined that the image to be processed whose frame sequence is in the range of 61 to 120 is adjusted using the first color adjustment coefficient. Thus, when it is determined that the frame sequence of the image to be processed is 67, it is determined that the image to be processed is adjusted according to the first color adjustment coefficient, wherein the first color adjustment coefficient is determined according to the video graphics with a frame sequence of 0 to 60; when the frame sequence of the image to be processed is 121, it is determined that the target video image is determined according to the frame sequence, and the color adjustment coefficient of the video image is obtained according to the target image. In this embodiment, the color adjustment coefficient of the image to be processed is determined by the frame sequence, which improves the speed of determining the color adjustment coefficient.

[0130] In this embodiment, the method for obtaining the color adjustment coefficient of a video image from a target image can be achieved by obtaining the third average color value of the pixels in the candidate regions of each target video image, screening for target pixels in each target video image to obtain the fourth average color value of the target pixels in multiple target video images, and obtaining the color adjustment coefficient of the video image based on the third average color value and the fourth average color value.

[0131] It can be understood that in this embodiment, there are multiple target video images. Thus, the first average color value of the pixels in the candidate region of each target image and the second average color value of the target pixels can be obtained. Furthermore, the third average color value and the fourth average color value are respectively determined based on the average of the first average color values and the average of the second average color values of each target video image. Then, the color adjustment coefficient is determined based on the ratio of the third average color value and the fourth average color value, achieving the accurate determination of the color adjustment coefficient.

[0132] Regarding the color adjustment scheme for images during video playback, deep learning technology is often used to generate pictures and adjust the regions with weak light intensity in each picture. In this case, the brightness of each picture will be discontinuous, resulting in a flickering phenomenon in the final generated video and reducing the user's viewing experience. However, in this embodiment, when playing a video, the color of the currently played video image is adjusted based on the already played video images, making the colors of the front and back played video images correlated, and avoiding the problem of flickering of the front and back played video images when adjusting the current video image through a single algorithm.

[0133] Refer to Figure 5 , the present invention also provides an apparatus for the method of image color adjustment. The apparatus for the method of image color adjustment includes:

[0134] A pixel determination module 10, configured to determine a to-be-processed image and determine the target pixels of the to-be-processed image;

[0135] A candidate region determination module 20, configured to determine a candidate region with stronger light in the to-be-processed image;

[0136] An average color value determination module 30, configured to determine the first average color value of the pixels in the candidate region and determine the second average color value of the target pixels;

[0137] An adjustment coefficient determination module 40, configured to determine the color adjustment coefficient of the to-be-processed image based on the first average color value and the second average color value;

[0138] An adjustment module 50, configured to adjust the to-be-processed image based on the color adjustment coefficient.

[0139] The present invention also provides a color adjustment device for images. The color adjustment device for images includes a memory, a processor, and a color adjustment program for images stored in the memory and executable on the processor. When the color adjustment program for images is executed by the processor, each step of the color adjustment method for images described in the above embodiments is implemented.

[0140] The present invention also provides a computer-readable storage medium storing a color adjustment program for images. When the color adjustment program for images is executed by a processor, each step of the color adjustment method for images described in the above embodiments is implemented.

[0141] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0142] It should be noted that in this text, the term "including", "comprising" or any other variant thereof is intended to cover a non-exclusive inclusion, such that a process, system, article or device including a series of elements includes not only those elements but also other elements not expressly listed, or also includes elements inherent to such process, system, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, system, article or device including the element.

[0143] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-described embodiment system can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product is stored in a computer-readable storage medium as described above (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions for causing a terminal device (which can be a mobile phone, computer, parking management device, air conditioner, or network device, etc.) to execute the system described in each embodiment of the present invention.

[0144] The above are only the preferred embodiments of the present invention, and thus do not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present invention.

Claims

1. A method for color adjustment of an image, characterized in that, The color adjustment method for the image includes: Determine the image to be processed, and obtain the chromaticity values of each pixel in the image to be processed; determine the average value and standard deviation of the chromaticity values of each pixel in the image to be processed according to the chromaticity values and the number of pixels; determine the adjustment coefficient corresponding to the average value; obtain the target pixel of the image to be processed according to the first formula, the second formula, the average value, the standard deviation, and the adjustment coefficient, and the first formula is: |U(i, j) – (Mu + Du)| < Xu * Du; wherein, U(i, j) represents the U chromaticity value corresponding to the pixel point (i, j) in the image to be processed, Mu represents the average value of the U chromaticity values of the image to be processed, Du represents the standard deviation of the U chromaticity values of the image to be processed, and Xu represents the adjustment coefficient of the U chromaticity values of the image to be processed; The second formula is: |V(i, j) – (Mv + Dv)| < Xv * Dv; wherein, V(i, j) represents the V chromaticity value corresponding to the pixel point (i, j) in the image to be processed, Mv represents the average value of the V chromaticity values of the image to be processed, Dv respectively represents the standard deviation of the V chromaticity values of the image to be processed, and Xv represents the adjustment coefficient of the V chromaticity values of the image to be processed; Determine the average value of the brightness of the image to be processed and the standard deviation of the brightness; determine the candidate region according to the third formula, the brightness, the standard deviation, the average value, and the region percentage, and the third formula is: |U – (M + D)| < X * D; wherein, U represents the brightness of the pixel, M represents the average value of the brightness of each pixel in the entire image to be processed, D represents the standard deviation of the brightness of each pixel in the entire image to be processed, and X is the adjustment coefficient of the brightness of each pixel in the entire image to be processed; Determine the first average color value of the pixels in the candidate region, and determine the second average color value of the target pixel; Determine the color adjustment coefficient of the image to be processed according to the ratio of the first average color value and the second average color value; Adjust the image to be processed based on the color adjustment coefficient.

2. The method for color adjustment of an image according to claim 1, wherein, The step of determining the first average color value of the pixels in the candidate region and determining the second average color value of the target pixel includes: Obtain the color values of the pixels in the candidate region; Determine the first average color value of the candidate region according to the color values of the pixels and the number of pixels; Obtain the color value of the target pixel and the number of the target pixels; Obtain the second average color value according to the color value of the target pixel and the number of the target pixels.

3. The color adjustment method of the image according to claim 1, characterized in that, After the step of determining the image to be processed, it further includes: When the image to be processed is a video image, obtain the frame sequence of the image to be processed; Determine the color adjustment coefficient of the image to be processed according to the frame sequence, and adjust the image to be processed based on the color adjustment coefficient.

4. The method for color adjustment of an image according to claim 3, wherein, The step of determining the color adjustment coefficient of the image to be processed according to the frame sequence includes: Determine whether the image to be processed belongs to the video image within the adjustment range of the previous color adjustment coefficient according to the frame sequence; If so, determine the previous color adjustment coefficient as the color adjustment coefficient of the image to be processed; If not, determine the target video images according to the frame sequence, and obtain the color adjustment coefficient of the image to be processed according to the target video images, where there are multiple target video images.

5. The method for color adjustment of an image according to claim 4, wherein The step of obtaining the color adjustment coefficient of the image to be processed according to the target video images includes: Obtain the third average color value of the pixels in the candidate regions of each target video image; Screen target pixels in each target video image to obtain the fourth average color value of the target pixels in multiple target video images; Obtain the color adjustment coefficient of the video image according to the third average color value and the fourth average color value.

6. A method and apparatus for color adjustment of an image, characterized in that, The image color adjustment method device includes: A pixel determination module, configured to determine an image to be processed, obtain the chromaticity values of the pixels in the image to be processed; determine the average value and standard deviation of the chromaticity values of the pixels in the image to be processed according to the chromaticity values and the number of pixels; determine an adjustment coefficient corresponding to the average value; obtain the target pixels of the image to be processed according to the first formula, the second formula, the average value, the standard deviation, and the adjustment coefficient, where the first formula is: |U(i, j) – (Mu + Du)| < Xu * Du; where U(i, j) represents the U chromaticity value corresponding to the pixel point (i, j) in the image to be processed, Mu represents the average value of the U chromaticity values of the image to be processed, Du represents the standard deviation of the U chromaticity values of the image to be processed, and Xu represents the adjustment coefficient of the U chromaticity values of the image to be processed; The second formula is: |V(i, j) – (Mv + Dv)| < Xv * Dv; where V(i, j) represents the V chromaticity value corresponding to the pixel point (i, j) in the image to be processed, Mv represents the average value of the V chromaticity values of the image to be processed, Dv respectively represents the standard deviation of the V chromaticity values of the image to be processed, and Xv represents the adjustment coefficient of the V chromaticity values of the image to be processed; A candidate region determination module, configured to determine the average value and standard deviation of the brightness of the image to be processed; determine the candidate region according to the third formula, the brightness, the standard deviation, the average value, and the region percentage, where the third formula is: |U – (M + D)| < X * D; where U represents the brightness of the pixel, M represents the average value of the brightness of all pixels in the image to be processed, D represents the standard deviation of the brightness of all pixels in the image to be processed, and X is the adjustment coefficient of the brightness of all pixels in the image to be processed; An average color value determination module, configured to determine the first average color value of the pixels in the candidate region and determine the second average color value of the target pixels; An adjustment coefficient determination module, configured to determine the color adjustment coefficient of the image to be processed according to the ratio of the first average color value and the second average color value; An adjustment module, configured to adjust the image to be processed based on the color adjustment coefficient.

7. An image color adjustment device, characterized in that, The color adjustment device for the image includes a memory, a processor, and a color adjustment program for the image stored in the memory and executable on the processor. When the color adjustment program for the image is executed by the processor, it implements each step of the color adjustment method for the image according to any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a color adjustment program for the image. When the color adjustment program for the image is executed by a processor, it implements each step of the color adjustment method for the image according to any one of claims 1-5.

Citation Information

Patent Citations

  • A self-adapted white balance correction method

    CN101193316A

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

    CN108024107A