WO2022121893A1 - Image processing method and apparatus, and computer device and storage medium - Google Patents

Image processing method and apparatus, and computer device and storage medium Download PDF

Info

Publication number
WO2022121893A1
WO2022121893A1 PCT/CN2021/136086 CN2021136086W WO2022121893A1 WO 2022121893 A1 WO2022121893 A1 WO 2022121893A1 CN 2021136086 W CN2021136086 W CN 2021136086W WO 2022121893 A1 WO2022121893 A1 WO 2022121893A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
pixel
color
channel
value
Prior art date
Application number
PCT/CN2021/136086
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 WO2022121893A1 publication Critical patent/WO2022121893A1/en

Links

Images

Classifications

    • G06T5/90
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration by the use of more than one image, e.g. averaging, subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging

Definitions

  • the present application relates to the technical field of image processing, and in particular, to an image processing method, apparatus, computer equipment and storage medium.
  • saturation is an important factor for evaluating the effect of image processing. Saturation refers to the vividness of the color, also known as the purity of the color.
  • the overall image or video will look blurry.
  • the method cannot solve these problems well, and there are more or less distortions after processing.
  • the classic histogram equalization algorithm can improve the overall contrast of the image, but the contrast of the image will be oversaturated and the overall image quality will be degraded; there are also corresponding deep learning algorithms (such as DPED), which will lead to oversaturation of the overall image quality. Solid color overflow, etc.
  • An image processing method comprising:
  • the minimum value is selected from the channel color ratios corresponding to each color channel of the saturation boosting pixel as the color suppression ratio corresponding to each color channel of the saturation boosting pixel;
  • Color suppression processing is performed on each color channel of the saturation boosting pixel based on the color suppression ratio corresponding to each color channel of the saturation boosting pixel to obtain a target image.
  • the acquiring the saturation enhancement pixels in the processed image includes:
  • each pixel in the processed image determines the pixel boost ratio of each pixel in the processed image relative to the grayscale image
  • Pixels whose pixel enhancement ratio is greater than a preset threshold in the processed image are used as saturation enhancement pixels.
  • calculating the channel color ratio corresponding to each color channel of the saturation-boosted pixel based on the value of each color channel of the saturation-boosted pixel and the channel statistical value includes:
  • the channel color ratios corresponding to the respective color channels of the saturation boosting pixels are calculated and obtained.
  • the calculated channel color ratios corresponding to the respective color channels of the saturation enhancement pixels include:
  • the second ratio is obtained by subtracting the adjustment weight corresponding to each color channel value of the saturation boosting pixel from the preset value;
  • the first ratio and the second ratio are added to obtain the channel color ratio corresponding to each color channel of the saturation boosting pixel.
  • the method further includes: acquiring pixels whose pixel values are greater than a preset threshold in the grayscale image as highlight pixels;
  • the third ratio and the fourth ratio are added to obtain the channel color ratio corresponding to each color channel of the highlight pixel point.
  • performing image processing on the image to be processed to obtain the processed image includes:
  • Noise suppression is performed on the second pixel in the intermediate image according to the noise suppression weight to obtain a processed image.
  • performing image processing on the image to be processed to obtain the processed image includes:
  • An image processing device comprising:
  • the processing image acquisition module is used to perform image processing on the image to be processed to obtain the processed image
  • a channel statistical value acquisition module configured to acquire the color channel value corresponding to each pixel in the processed image, perform statistics on the color channel value, and obtain the channel statistical value corresponding to the processed image;
  • the channel color ratio acquisition module is used to acquire the saturation enhancement pixel points in the processed image, and based on the respective color channel values of the saturation enhancement pixel points and the channel statistical values, calculate and obtain each saturation enhancement pixel point.
  • a color suppression ratio acquisition module configured to select a minimum value from the channel color ratios corresponding to each color channel of the saturation boosting pixel as the color suppression ratio corresponding to each color channel of the saturation boosting pixel;
  • a target image acquisition module configured to perform color suppression processing on each color channel of the saturation enhancement pixel based on the color suppression ratio corresponding to each color channel of the saturation enhancement pixel to obtain a target image.
  • a computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
  • the minimum value is selected from the channel color ratios corresponding to each color channel of the saturation boosting pixel as the color suppression ratio corresponding to each color channel of the saturation boosting pixel;
  • color suppression processing is performed on the respective color channels of the saturation-enhanced pixels to obtain a target image.
  • the minimum value is selected from the channel color ratios corresponding to each color channel of the saturation boosting pixel as the color suppression ratio corresponding to each color channel of the saturation boosting pixel;
  • color suppression processing is performed on the respective color channels of the saturation-enhanced pixels to obtain a target image.
  • the above image processing method, device, computer equipment and storage medium after image processing is performed on the image to be processed, a processed image is obtained, the color channel value corresponding to each pixel in the processed image is obtained, and the color channel value is counted. Obtain the channel statistical value corresponding to the processed image; and then obtain the saturation enhancement pixel in the above-mentioned processed image, and calculate the channel color ratio corresponding to the color channel based on each color channel value of the saturation enhanced pixel and the channel statistical value.
  • the minimum value among the color ratios is selected as the color suppression ratio corresponding to the saturation enhancement pixel, so the color suppression processing can be performed on the pixels with high saturation, which improves the image processing effect.
  • Fig. 1 is the application environment diagram of the image processing method in one embodiment
  • Fig. 2 is a schematic flowchart of an image processing method
  • FIG. 3 is a schematic flowchart of a method for obtaining saturation-boosting pixels in a processed image in one embodiment
  • FIG. 4 is a schematic flowchart of a method for obtaining saturation-boosting pixels in a processed image in another embodiment
  • FIG. 5 is a schematic flowchart of a method for obtaining saturation-boosting pixels in a processed image in another embodiment
  • FIG. 6 is a schematic flowchart of an image processing method in another embodiment
  • FIG. 7 is a schematic flowchart of an image processing method to obtain an image processing method in an embodiment
  • FIG. 8 is a schematic flowchart of a method for processing an image by performing image processing on an image to be processed in another embodiment
  • FIG. 9 is a structural block diagram of an image processing apparatus in one embodiment
  • Figure 10 is a diagram of the internal structure of a computer device in one embodiment.
  • the image processing method provided in this application can be applied to the application environment shown in FIG. 1 .
  • the application environment includes an image capturing device 102 and a terminal 104 , wherein the image capturing device 102 and the terminal 104 are connected in communication. After the image acquisition device 102 collects the image to be processed, it is transmitted to the terminal 104, and the terminal 104 obtains the image to be processed.
  • the terminal 104 can count the color channel values corresponding to each pixel of the obtained image to be processed, and obtain Process the channel statistics corresponding to the image; and obtain the saturation enhancement pixels in the processed image, and calculate the channel color ratio corresponding to the color channel based on the respective color channel values and the channel statistics of the above saturation enhancement pixels; Select the minimum value among the channel color ratios corresponding to each color channel corresponding to the pixel, as the color suppression ratio corresponding to the saturation boosting pixel; perform color suppression processing on the saturation boosting pixel based on the color suppression ratio corresponding to the saturation boosting pixel , get the target image.
  • the image capturing device 102 may be, but is not limited to, various devices having an image capturing function, and may be distributed outside the terminal 104 or inside the terminal 104 . For example: various cameras, scanners, various cameras, and image capture cards distributed outside the terminal 104 .
  • the terminal 104 may be, but is not limited to, various cameras, personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices.
  • an image processing method is provided, and the method is applied to the terminal in FIG. 1 as an example for description, including the following steps:
  • Step 202 Perform image processing on the image to be processed to obtain a processed image.
  • the processed image refers to an image after image processing.
  • the terminal may use the image acquired in real time as the image to be processed, and the display effect of the image to be processed is not ideal, so it is necessary to perform image processing on the image to be processed to obtain the processed image.
  • the terminal may also obtain the processed image by acquiring the to-be-processed image from the memory storing the image, and performing image processing on the to-be-processed image.
  • a grayscale image may be obtained by performing grayscale processing on the image to be processed, and a brightened image may be obtained by performing a brightening process on the grayscale image, and a contrast enhancement process may be performed on the grayscale image to obtain a contrast enhanced image.
  • the brightness image, the brightened image and the contrast enhanced image are fused to obtain the intermediate processed image, and the intermediate processed image obtained at this time can be used as the processed image.
  • the intermediate processed image obtained by the fusion processing of the grayscale image, the brightened image and the contrast enhanced image in the above-mentioned embodiment is selected, and noise suppression processing may be further performed, and the obtained processed image is used as the processing image. image.
  • noise suppression processing is performed on the intermediate processed image (ie, the intermediate image), which may specifically be:
  • the noise suppression weight of the corresponding second pixel point is obtained according to the pixel value of the first pixel point in the grayscale image, and the pixel value and the noise suppression weight have a correlation;
  • Noise suppression is performed on the second pixel in the intermediate image according to the noise suppression weight to obtain a processed image.
  • Step 204 Acquire color channel values corresponding to each pixel in the processed image, perform statistics on the color channel values, and obtain channel statistical values corresponding to the processed image.
  • the color channel value refers to the value of each channel after each pixel is divided into three channels: R (red), G (green), and B (blue).
  • the value of each channel can be represented using the corresponding pixel value for each channel. For example, for a certain pixel, the color channel values of the RGB three channels are 199, 237 and 204 respectively.
  • the channel statistics value refers to the color channel value that can reflect the overall data characteristics of the color channel value.
  • the channel statistics can refer to the average of the three color channel values, or the median, etc.
  • the terminal can acquire the processed image, use its own pixel point analysis software or analysis tool to detect the color channel value corresponding to each pixel point, and obtain the channel statistical value corresponding to the processed image through calculation.
  • Step 206 Acquire the saturation enhancement pixels in the processed image, and calculate the channel color ratio corresponding to each color channel of the saturation enhancement pixel based on the value of each color channel and the channel statistics value of the saturation enhancement pixel.
  • the saturation-enhanced pixel points refer to the pixel points whose saturation degree of the processed image point is improved relative to the saturation degree of the original pixel degree point in the to-be-processed image.
  • the channel color ratio refers to the respective proportions of the RGB three-channel colors in each pixel corresponding to each pixel.
  • the channel statistics value corresponding to the processed image is obtained by calculation, and the saturation enhancement pixel point in the processed image is acquired, and based on the saturation enhancement pixel point in the processed image, the obtained Channel color ratio.
  • the color saturation of a certain channel of the image has a positive correlation with the absolute value of the difference between the corresponding channel statistical values.
  • the greater the absolute value of the difference between the color channel value and the processed image the higher the color saturation of a certain channel of the image.
  • the greater the absolute value of the difference between the red color channel value represented by R in the three RGB channels and the processed image the higher the red saturation of the R channel, and the redder the red in the image.
  • Step 208 Select the minimum value from the channel color ratios corresponding to each color channel of the saturation boosting pixel as the color suppression ratio corresponding to each color channel of the saturation boosting pixel.
  • the color suppression ratio refers to a ratio used to suppress excessive color saturation. By establishing a functional relationship between the ratio and the corresponding channel color, the image processing effect can be improved.
  • the channel color ratio is a value greater than 1, the closer the value is to 1, the higher the saturation of the image, so the minimum value selected in the channel color ratio is the value closest to 1, and this value is used as color suppression Ratio, based on this color suppression ratio, the color suppression processing is performed on the saturation enhancement pixels to obtain the target image.
  • Step 210 performing color suppression processing on each color channel of the saturation boosting pixel based on the color suppression ratio corresponding to each color channel of the saturation boosting pixel to obtain a target image.
  • a functional relationship is established between the pixel value of the saturation boosting pixel and the color suppression ratio, so as to obtain the pixel value of the pixel obtained after the functional relationship is established, so as to play the role of color
  • the effect of the processing is suppressed, and the target image is obtained.
  • establishing a functional relationship between the saturation enhancement pixel and the color suppression ratio may be that the color suppression ratio is used as a coefficient, and the pixel value of the saturation enhancement pixel is multiplied by the color suppression ratio, so as to obtain the suppressed pixel, Thereby obtaining the target image.
  • the color channel value corresponding to each pixel in the processed image is obtained, and the channel corresponding to the processed image is obtained by counting the color channel values.
  • Statistical value by obtaining the saturation enhancement pixels in the above-mentioned processed image, the channel color ratio corresponding to the color channel is calculated based on the value of each color channel of the saturation enhancement pixel and the channel statistical value, and the minimum value is selected from the channel color ratio.
  • the step of acquiring and processing the saturation-boosting pixels in the image includes:
  • Step 302 Obtain a grayscale image corresponding to the image to be processed.
  • grayscale image refers to an image in which the image is divided into several levels from black to white. Grayscale image can make the transition of the image more smooth and delicate.
  • the image to be processed may be correspondingly converted to obtain a converted grayscale image.
  • Step 304 according to the pixel value of each pixel in the processed image and the pixel value of the pixel at the corresponding position in the grayscale image, determine the pixel boost ratio of each pixel in the processed image relative to the grayscale image.
  • the pixel enhancement ratio refers to the enhancement degree of the pixel value of each pixel point in the processed image relative to the pixel value of the pixel point at the corresponding position in the grayscale image.
  • the pixel value of the pixel point is a numerical value, and there is a positive correlation between the numerical value and the saturation, through which the processing image can be determined to determine the pixel enhancement ratio of the processing image relative to the grayscale image.
  • the pixel value of the processed image to determine the pixel enhancement ratio of the processed image relative to the grayscale image can be represented by the multiple relationship between the pixel value of each pixel point in the processed image and the pixel value of the corresponding pixel point in the grayscale image.
  • the processing image determines that the pixel enhancement ratio of the processed image relative to the grayscale image is represented as ratio src .
  • ratio src (I+1)/(I1+1)
  • Step 306 the pixels whose pixel enhancement ratio is greater than the preset threshold in the processed image are regarded as saturation enhancement pixels.
  • the preset threshold refers to the set critical value.
  • the pixels that meet the conditions are used as saturation enhancement pixels; when it is less than the critical value, the pixels that meet the conditions do not need to be used as saturation enhancement pixels. pixel.
  • the pixels that need to be increased in saturation can be screened out in the form of a preset threshold, and the saturation of the screened out pixels can be adjusted.
  • the preset threshold value can be set to a fixed value, and when it is greater than the fixed value, the pixels that meet the conditions are screened out as the pixels whose saturation is to be improved; it can be understood that when it is less than this fixed value, Then the pixels that meet the conditions are not used as pixels to enhance the saturation.
  • the fixed value is 1
  • the pixel boost ratio is ratio src , and when ratio src is greater than 1, the corresponding pixels in the processed image that meet the conditions will be screened out for saturation boost processing; when ratio src is less than 1, it will satisfy the The pixels in the processed image under this condition do not undergo saturation enhancement processing.
  • the pixel enhancement ratio of the processed image relative to the grayscale image is determined by determining the processing image, a preset threshold is set for the pixel enhancement ratio, and the saturation enhancement pixels are screened out through the preset threshold, so that the saturation enhancement can be accurately determined. The purpose of improving the pixel point.
  • the steps are based on the value of each color channel and the statistical value of the channel of the pixel point of saturation enhancement, and the calculated channel color ratio corresponding to each color channel of the pixel point of saturation enhancement includes:
  • Step 402 Calculate the change value of each color channel value of the saturation boosting pixel point relative to the channel statistical value.
  • the change value of the color channel value of each saturation-boosting pixel point relative to the channel statistical value may be a difference value of the color channel value of each saturation-boosting pixel point relative to the channel statistical value.
  • d c-avg
  • Step 404 Determine the adjustment weights corresponding to each color channel value of the saturation boosting pixel point according to the change value, and the adjustment weight of the color channel value has a negative correlation with the change value.
  • the adjustment weight refers to the degree of importance that needs to be adjusted for each color channel value of each saturation enhancement pixel. It has a negative correlation with the change value, the larger the change value, the smaller the adjustment weight, and the smaller the change value, the larger the adjustment weight.
  • the adjustment weight may be represented by a functional relationship between the change value and the adjustment weight. For example, if any channel adjustment weight is expressed as w(c,avg), the functional relationship between the change value d and the color channel value adjustment weight w(c,avg) can be expressed as:
  • Step 406 Calculate the channel color ratio corresponding to each color channel of the saturation boosting pixel according to the adjustment weight corresponding to each color channel value of the saturation boosting pixel.
  • the channel color ratio ratio c corresponding to the color channel of each saturation enhancement pixel can be calculated.
  • the channel color ratio ratio c corresponding to each color channel of the saturation boosting pixel can be expressed as:
  • ratio c ratio src *w(c,avg)+(1-w(c,avg))*1
  • the adjustment weight corresponding to each color channel value of each saturation enhancement pixel is obtained by the change value of each color channel value of the saturation enhancement pixel relative to the channel statistical value, and the channel color ratio can be obtained by adjusting the weight. the goal of.
  • the steps are based on the adjustment weights corresponding to the respective color channel values of the saturation boosting pixels, and the calculated channel color ratios corresponding to the respective color channels of the saturation boosting pixels include:
  • Step 502 Calculate the first ratio according to the product of the adjustment weight corresponding to each color channel value of the saturation boosting pixel and the pixel boosting ratio of the saturation boosting pixel.
  • ratio c1 which can be calculated by the following formula:
  • ratio c1 ratio src *w(c,avg)
  • Step 504 using the preset value to subtract the adjustment weight corresponding to each color channel value of the saturation boosting pixel to obtain the second ratio.
  • ratio c2 the second ratio
  • e the default value
  • ratio c2 can be expressed as:
  • the preset value e may be 1, and the second ratio ratio c2 may be expressed as:
  • Step 506 adding the first ratio and the second ratio to obtain the channel color ratio corresponding to each color channel of the pixel point with increased saturation.
  • the channel color ratio is expressed as ratio c
  • the first ratio is expressed as ratio c1
  • the second ratio is expressed as ratio c2
  • the channel color ratio ratio c can be expressed as:
  • ratio c ratio c1 + ratio c2
  • the first ratio is obtained by multiplying the adjustment weight corresponding to each color channel value of the saturation boosting pixel and the pixel boosting ratio of the saturation boosting pixel, and the preset value is used to subtract the saturation boosting pixel corresponding to
  • the purpose of obtaining the channel color ratio corresponding to the color channel can be achieved through the first ratio and the second ratio, so as to select the minimum value in the color ratio of the channel as the color suppression ratio, and use the color suppression ratio Perform color suppression processing on the image to obtain the target image.
  • the step image processing method further includes:
  • Step 602 Acquire the pixel points whose pixel value is greater than the preset threshold in the grayscale image, as the highlight pixel points.
  • the highlight pixel refers to the pixel with higher pixel value.
  • pixels with pixel values greater than the preset threshold are regarded as highlight pixels; pixels with pixel values less than or equal to the preset threshold are not included in the range of highlight pixels.
  • the highlight pixels have an impact on the quality of the image. The more highlight pixels there are in the image, the worse the image quality.
  • Step 604 Multiply the pixel boost ratio corresponding to the highlight pixel point by the first coefficient to obtain a third ratio
  • the pixel enhancement ratio corresponding to the highlight pixel is expressed as ratio src
  • the first coefficient is expressed as f
  • the third ratio is expressed as ratio c3
  • the third ratio expressed as ratio c3 can be expressed as:
  • ratio c3 ratio src *f
  • the first coefficient f has a negative correlation with the pixel value I of the pixel point at the corresponding position of the highlight pixel point in the processed image.
  • the first coefficient f can be expressed as:
  • the preset threshold may be 230, and pixels with pixel values greater than 230 in the grayscale image are used as highlight pixels.
  • the first coefficient f can be obtained by a preset threshold.
  • Step 606 subtract the first coefficient from the preset value to obtain a fourth ratio.
  • the preset value is identified as g, and the fourth ratio is expressed as ratio c4 , then the fourth ratio ratio c4 is expressed as:
  • the preset value is 1, and the fourth ratio ratio c4 is expressed as:
  • Step 608 adding the third ratio and the fourth ratio to obtain the channel color ratio corresponding to each color channel of the highlight pixel point.
  • ratio c' the channel color ratio corresponding to the color channel of the highlight pixel is expressed as ratio c' , then ratio c' is expressed as:
  • ratio c' ratio c3 +ratio c4
  • the three channels are respectively multiplied by the ratio ratio c' to obtain the channel color ratio corresponding to the color channel of the highlight pixel point.
  • the three channels are multiplied by this ratio, and the maximum value in the obtained result is greater than 255, then the pixel value on the channel is forced to be set to 255, and the ratio of 255 to the above-mentioned maximum value is calculated.
  • the highlight pixels are selected by setting a preset threshold, and the channel color ratio corresponding to the color channel of the highlight pixel can be obtained through the functional relationship between the pixel boost ratio corresponding to the highlight pixel and the corresponding coefficient. the goal of.
  • the steps of performing image processing on the image to be processed to obtain the processed image include:
  • Step 702 Perform image processing on the image to be processed to obtain an intermediate image.
  • the intermediate image refers to an image before the image to be processed is processed, but the processed image required by the user has not been obtained.
  • the intermediate image may be a fused image
  • the fused image is an image obtained by performing fusion processing on the images to be processed.
  • Step 704 Obtain a first pixel whose pixel value is less than a preset threshold in the grayscale image corresponding to the image to be processed, and use the pixel corresponding to the first pixel in the intermediate image as the second pixel.
  • the terminal can obtain the pixel value in the grayscale image corresponding to the image to be processed through the pixel value obtaining tool, and obtain the pixel value smaller than the preset threshold by comparing the obtained pixel value with the preset threshold value stored at the local end.
  • the first pixel point, and the pixel point corresponding to the first pixel point in the intermediate image is used as the second pixel point.
  • the preset threshold value of a pixel point may be 64, and the terminal acquires a pixel point whose pixel value is less than 64 in the grayscale image as the first pixel point, and simultaneously acquires the first pixel point in the intermediate image corresponding to the first pixel point. two pixels.
  • Step 706 Obtain the noise suppression weight of the corresponding second pixel point according to the pixel value of the first pixel point in the grayscale image, and the pixel value and the noise suppression weight have a correlation.
  • the noise suppression weight of the second pixel can be expressed as w
  • the pixel value of the first pixel in the grayscale image can be expressed as I 1
  • is a preset threshold
  • the noise suppression weight of the second pixel is w can be expressed as:
  • the preset threshold ⁇ is 64, and the pixel value less than 64 can be regarded as a dark area image, and the noise suppression weight w of the second pixel is obtained by selecting the preset threshold.
  • Step 708 Perform noise suppression on the second pixel in the intermediate image according to the noise suppression weight to obtain a processed image.
  • the grayscale image is adjusted by the noise suppression weight to obtain the processed image. It can be understood that the processed image can be used as the target image to obtain the previous intermediate image.
  • the intermediate image may be processed through a noise suppression weight, and the intermediate image may be controlled within a range of twice the pixel value of the image to be processed. For example, if the intermediate image is represented as I enhance and the processed image is represented as I, then I can be represented as:
  • the pixel value of the processed image can be controlled within Within twice the pixel value of the image to be processed, so that the image with the pixel value less than the preset threshold can improve the brightness, make the details more prominent, and prevent color faults due to excessive pixel value difference.
  • the steps of performing image processing on the image to be processed to obtain the processed image include:
  • Step 802 Obtain a grayscale image corresponding to the image to be processed.
  • the to-be-processed image is converted into a grayscale image, and the conversion method includes a component method, a maximum value method, a weighted average method, and the like.
  • a weighted average method can be used to convert the image to be processed into a grayscale image, and the pixel values of the three RGB channels in the image to be processed are weighted and averaged according to different weights to obtain a grayscale image.
  • the pixel value of a grayscale image is represented as I 1 (i,j)
  • the pixel values of the RGB three-channel color in the image to be processed are R(i,j), G(i,j) and B(i,j respectively )
  • the pixel value I 1 (i,j) of the grayscale image can be expressed as:
  • I1(i,j) 0.299R(i,j)+0.578G(i,j)+0.114B(i,j)
  • Step 804 performing brightening processing on the grayscale image to obtain a brightened image.
  • the brightened image corresponding to the grayscale image can be obtained through the functional relationship between the pixel value of the grayscale image and the pixel value of the brightened image.
  • a brightened image is represented by I 2
  • a grayscale image is represented by I 1
  • a and b are represented as independent variables, and the two have the following functional relationship:
  • the independent variable a can take the value of 2
  • the independent variable b can take the value of 20.
  • Step 806 Perform contrast enhancement processing on the grayscale image to obtain a contrast enhanced image.
  • a low-pass filter map I guide can be obtained through guide filtering through a grayscale image, and an intermediate image v 1 with enhanced contrast can be obtained through the low-pass filter map I guide :
  • the guided filter is a low-pass filter.
  • the independent variable c can be selected as 1.2, which enables the contrast - enhanced intermediate image v1 to retain more image details.
  • the difference calculation is performed between the grayscale image and the above-mentioned intermediate image, so as to obtain more image details, and the detail enhancement coefficient k detail is set to obtain an enhanced intermediate image v 2 with prominent details,
  • the formula is expressed as:
  • the detail enhancement coefficient k detail may be set to 4. On the basis of this detail enhancement coefficient, the processed image details are more prominent and the effect of image processing is improved.
  • a preset upper and lower limit is set for the intermediate processing image v 2 , the upper limit is represented as val max , and the lower limit is represented as val min , which is represented by the formula:
  • Step 808 Perform fusion processing on the grayscale image, the brightened image, and the contrast-enhanced image to obtain a processed image.
  • the processed image may be obtained by weighted fusion of the grayscale image, the brightened image, and the contrast-enhanced image.
  • the grayscale image as I 1
  • the brightened image as I 2
  • the contrast-enhanced image as I 3
  • the corresponding weight map of I 1 , I 2 and I 3 can be expressed by the following formula:
  • the weight maps corresponding to the grayscale image I 1 , the brightened image I 2 and the contrast-enhanced image I 3 are set as w 1 , w 2 and w 3 , respectively,
  • the weights corresponding to the position are added up, and each weight is changed to the current weight value divided by the weight sum; for example, the weights of the weights w1, w2 and w3 are ⁇ 3.52.54 ⁇ , then normalized and converted to ⁇ 0.350.250.4 ⁇ .
  • the transformed weights are set as new weights at the corresponding positions to form a weight map.
  • Multi-scale fusion or multi-resolution fusion of weight map and grayscale image, brightened image and contrast-enhanced image is performed to obtain the processed image. It can be understood that the processed image at this time may be a fused image serving as an intermediate image.
  • the purpose of obtaining a fused image can be achieved by converting the image into a grayscale image, a brightened image, and a contrast-enhanced image, respectively, for fusion processing, and weighted fusion of the images.
  • the fused image obtained in the above embodiment can be used as the processed image in step 202 , and the above fused image can also be used as the processed image in step 202 after the noise suppression processing in steps 702 to 708 in FIG. 7 .
  • Process images can be used as the processed image in step 202 , and the above fused image can also be used as the processed image in step 202 after the noise suppression processing in steps 702 to 708 in FIG. 7 .
  • FIGS. 1-8 are shown in sequence according to the arrows, these steps are not necessarily executed in the sequence shown by the arrows. Unless explicitly stated herein, the execution of these steps is not strictly limited to the order, and these steps may be performed in other orders. Moreover, at least a part of the steps in FIGS. 1-8 may include multiple steps or multiple stages. These steps or stages are not necessarily executed and completed at the same time, but may be executed at different times. The execution of these steps or stages The order is also not necessarily sequential, but may be performed alternately or alternately with other steps or at least a portion of the steps or phases within the other steps.
  • an image processing apparatus 900 including: a processed image acquisition module 902, a channel statistical value acquisition module 904, a channel color ratio acquisition module 906, a color suppression ratio acquisition module 908 and Target image acquisition module 910, wherein:
  • a processed image acquisition module 902 configured to perform image processing on the image to be processed to obtain a processed image
  • a channel statistical value acquisition module 904 configured to acquire color channel values corresponding to each pixel in the processed image, perform statistics on the color channel values, and obtain channel statistics corresponding to the processed image;
  • the channel color ratio acquisition module 906 is used to acquire the saturation enhancement pixels in the processed image, and calculate the channel corresponding to each color channel of the saturation enhancement pixels based on the calculation of each color channel value and the channel statistical value of the saturation enhancement pixels. color ratio;
  • the color suppression ratio acquisition module 908 is used to select the minimum value from the channel color ratios corresponding to each color channel of the saturation boosting pixel as the color suppression ratio corresponding to each color channel of the saturation boosting pixel;
  • the target image acquisition module 910 is configured to perform color suppression processing on each color channel of the saturation boosted pixel based on the color suppression ratio corresponding to each color channel of the saturation boosted pixel to obtain a target image.
  • the channel color ratio obtaining module 906 is further configured to obtain a grayscale image corresponding to the image to be processed
  • each pixel in the processed image determines the pixel enhancement ratio of each pixel in the processed image relative to the grayscale image
  • the pixels whose pixel enhancement ratio is greater than the preset threshold in the processed image are regarded as saturation enhancement pixels.
  • the channel color ratio acquisition module 906 is further configured to calculate the change value of each color channel value of the saturation boosting pixel point relative to the channel statistical value;
  • the channel color ratio corresponding to each color channel of the saturation boosting pixel is calculated.
  • the channel color ratio obtaining module 906 is further configured to calculate the first ratio according to the product of the adjustment weight corresponding to each color channel value of the saturation boosting pixel and the pixel boosting ratio of the saturation boosting pixel;
  • the second ratio is obtained by subtracting the adjustment weight corresponding to each color channel value of the saturation boosting pixel from the preset value;
  • the first ratio and the second ratio are added to obtain the channel color ratio corresponding to each color channel of the pixel point with increased saturation.
  • the image processing apparatus further includes: a highlight pixel point acquisition module, a third ratio acquisition module, a fourth ratio acquisition module, and a channel color ratio acquisition module, wherein:
  • the highlight pixel point acquisition module is used to acquire the pixel points whose pixel value is greater than the preset threshold in the grayscale image, as the highlight pixel point;
  • the third ratio acquisition module is used to multiply the pixel boost ratio corresponding to the highlight pixel by the first coefficient to obtain a third ratio; the first coefficient and the pixel value of the pixel corresponding to the highlight pixel in the processed image are negative relationship;
  • a fourth ratio obtaining module used for subtracting the first coefficient from the preset value to obtain the fourth ratio
  • the channel color ratio acquisition module is used for adding the third ratio and the fourth ratio to obtain the channel color ratio corresponding to each color channel of the highlight pixel.
  • processing image acquisition module is further used to:
  • the noise suppression weight of the corresponding second pixel point is obtained according to the pixel value of the first pixel point in the grayscale image, and the pixel value and the noise suppression weight have a correlation;
  • Noise suppression is performed on the second pixel in the intermediate image according to the noise suppression weight to obtain a processed image.
  • processing image acquisition module is further used to:
  • the grayscale image, the brightened image and the contrast-enhanced image are fused to obtain the processed image.
  • Each module in the above-mentioned image processing apparatus may be implemented in whole or in part by software, hardware, and combinations thereof.
  • the above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
  • a computer device is provided, and the computer device may be a terminal, and its internal structure diagram may be as shown in FIG. 10 .
  • the computer equipment includes a processor, memory, a communication interface, a display screen, and an input device connected by a system bus.
  • the processor of the computer device is used to provide computing and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium, an internal memory.
  • the nonvolatile storage medium stores an operating system and a computer program.
  • the internal memory provides an environment for the execution of the operating system and computer programs in the non-volatile storage medium.
  • the communication interface of the computer device is used for wired or wireless communication with an external terminal, and the wireless communication can be realized by WIFI, operator network, NFC (Near Field Communication) or other technologies.
  • the computer program implements an image processing method when executed by a processor.
  • the display screen of the computer equipment may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment may be a touch layer covered on the display screen, or a button, a trackball or a touchpad set on the shell of the computer equipment , or an external keyboard, trackpad, or mouse.
  • FIG. 10 is only a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied. Include more or fewer components than shown in the figures, or combine certain components, or have a different arrangement of components.
  • a computer device including a memory and a processor, a computer program is stored in the memory, and the processor implements the following steps when executing the computer program:
  • Color suppression processing is performed on each color channel of the saturation boosted pixel based on the color suppression ratio corresponding to each color channel of the saturation boosted pixel to obtain a target image.
  • the processor further implements the following steps when executing the computer program:
  • each pixel in the processed image determines the pixel enhancement ratio of each pixel in the processed image relative to the grayscale image
  • the pixels whose pixel enhancement ratio is greater than the preset threshold in the processed image are regarded as saturation enhancement pixels.
  • the processor further implements the following steps when executing the computer program:
  • the channel color ratio corresponding to each color channel of the saturation boosting pixel is calculated.
  • the processor further implements the following steps when executing the computer program:
  • the first ratio is calculated according to the product of the adjustment weight corresponding to the saturation boosting pixel and the boosting ratio of the saturation boosting pixel;
  • the second ratio is obtained by subtracting the adjustment weight corresponding to each color channel value of the saturation boosting pixel from the preset value;
  • the first ratio and the second ratio are added to obtain the channel color ratio corresponding to each color channel of the pixel point with increased saturation.
  • the processor further implements the following steps when executing the computer program:
  • the pixel boost ratio corresponding to the highlight pixel is multiplied by the first coefficient to obtain a third ratio; the first coefficient has a negative correlation with the pixel value of the pixel at the corresponding position of the highlight pixel in the processed image;
  • the third ratio and the fourth ratio are added to obtain the channel color ratio corresponding to each color channel of the highlight pixel point.
  • the processor further implements the following steps when executing the computer program:
  • the noise suppression weight of the corresponding second pixel point is obtained according to the pixel value of the first pixel point in the grayscale image, and the pixel value and the noise suppression weight have a correlation;
  • Noise suppression is performed on the second pixel in the intermediate image according to the noise suppression weight to obtain a processed image.
  • the processor further implements the following steps when executing the computer program:
  • the grayscale image, the brightened image and the contrast-enhanced image are fused to obtain the processed image.
  • a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
  • Color suppression processing is performed on each color channel of the saturation boosted pixel based on the color suppression ratio corresponding to each color channel of the saturation boosted pixel to obtain a target image.
  • the computer program further implements the following steps when executed by the processor:
  • each pixel in the processed image determines the pixel enhancement ratio of each pixel in the processed image relative to the grayscale image
  • the pixels whose pixel enhancement ratio is greater than the preset threshold in the processed image are regarded as saturation enhancement pixels.
  • the computer program further implements the following steps when executed by the processor:
  • the channel color ratio corresponding to each color channel of the saturation boosting pixel is calculated.
  • the computer program further implements the following steps when executed by the processor:
  • the first ratio is calculated according to the product of the adjustment weight corresponding to each color channel value of the saturation boosting pixel and the pixel boosting ratio of the saturation boosting pixel;
  • the second ratio is obtained by subtracting the adjustment weight corresponding to each color channel value of the saturation boosting pixel from the preset value;
  • the first ratio and the second ratio are added to obtain the channel color ratio corresponding to each color channel of the pixel point with increased saturation.
  • the computer program further implements the following steps when executed by the processor:
  • the pixel boost ratio corresponding to the highlight pixel point with the first coefficient to obtain a third ratio; the first coefficient is in a negative correlation with the pixel value of the pixel point corresponding to the highlight pixel point in the processed image;
  • the third ratio and the fourth ratio are added to obtain the channel color ratio corresponding to each color channel of the highlight pixel point.
  • the computer program further implements the following steps when executed by the processor:
  • the noise suppression weight of the corresponding second pixel point is obtained according to the pixel value of the first pixel point in the grayscale image, and the pixel value and the noise suppression weight have a correlation;
  • Noise suppression is performed on the second pixel in the intermediate image according to the noise suppression weight to obtain a processed image.
  • the computer program further implements the following steps when executed by the processor:
  • the grayscale image, the brightened image and the contrast-enhanced image are fused to obtain the processed image.
  • Non-volatile memory may include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, or optical memory, and the like.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM may be in various forms, such as static random access memory (Static RandomAccess Memory, SRAM) or dynamic random access memory (Dynamic RandomAccess Memory, DRAM).

Abstract

An image processing method and apparatus, and a computer device and a storage medium. The method comprises: performing image processing on an image to be processed to obtain a processed image (S202); acquiring color channel values corresponding to pixel points in the processed image, and compiling statistics on the color channel values to obtain a channel statistical value corresponding to the processed image (S204); acquiring a saturation enhancement pixel point in the processed image, and calculating, on the basis of color channel values of the saturation enhancement pixel point and the channel statistical value, channel color ratios corresponding to color channels of the saturation enhancement pixel point (S206); selecting the minimum value from among the channel color ratios corresponding to the color channels of the saturation enhancement pixel point as a color suppression ratio corresponding to the color channels of the saturation enhancement pixel point (S208); and performing color suppression processing on the color channels of the saturation enhancement pixel point on the basis of the color suppression ratio corresponding to the color channels of the saturation enhancement pixel point, so as to obtain a target image (S210). By means of the method, the image processing efficiency can be improved.

Description

图像处理方法、装置、计算机设备和存储介质Image processing method, apparatus, computer equipment and storage medium 技术领域technical field
本申请涉及图像处理技术领域,特别是涉及一种图像处理方法、装置、计算机设备和存储介质。The present application relates to the technical field of image processing, and in particular, to an image processing method, apparatus, computer equipment and storage medium.
背景技术Background technique
随着图像处理技术的发展,用户对图像处理效果的要求也越来越高。例如,对图像处理中饱和度的处理效果的要求,饱和度是评价图像处理效果的一个重要因素。饱和度是指色彩的鲜艳程度,也称色彩的纯度,纯度越高,色彩表现越鲜明;纯度较低,色彩表现则较黯淡;但是当饱和度过高时,图像会产生失真现象。With the development of image processing technology, users have higher and higher requirements for image processing effects. For example, the requirements for the processing effect of saturation in image processing, saturation is an important factor for evaluating the effect of image processing. Saturation refers to the vividness of the color, also known as the purity of the color.
技术问题technical problem
针对相机直出的图像或者视频,如果动态范围不够以及画质整体对比度不够,会导致图像或者视频整体看起来比较模糊,如果饱和度不够,还会导致整体画质偏暗,现有的图像增强方法无法较好解决这些问题,或多或少存在一些处理后的失真。比如,经典的直方图均衡化算法可以提升图像整体对比度,但是会出现图像对比度过饱和,整体画质下降的情况;还有对应的深度学习算法(比如DPED),会导致整体画质过饱和,纯色溢出等问题。For images or videos straight from the camera, if the dynamic range is not enough and the overall contrast of the image quality is not enough, the overall image or video will look blurry. The method cannot solve these problems well, and there are more or less distortions after processing. For example, the classic histogram equalization algorithm can improve the overall contrast of the image, but the contrast of the image will be oversaturated and the overall image quality will be degraded; there are also corresponding deep learning algorithms (such as DPED), which will lead to oversaturation of the overall image quality. Solid color overflow, etc.
综上,可知目前并没有一种图像处理方法,能够对用户拍摄的视频或者图片内容进行自动处理以实现提升画面动态范围,同时提升对比度饱和度的效果,目前的图像处理方法,存在图像处理效果差,输出图像品质较低的问题。To sum up, it can be seen that there is currently no image processing method that can automatically process the video or picture content captured by the user to achieve the effect of improving the dynamic range of the picture and improving the contrast and saturation. The current image processing method has image processing effects. Poor, the output image quality is low.
技术解决方案technical solutions
基于此,有必要针对上述技术问题,提供一种能够提升画面动态范围,同时改善对比度饱和度,整体提高输出图像品质的图像处理方法、装置、计算机设备和存储介质。Based on this, it is necessary to provide an image processing method, device, computer equipment and storage medium that can improve the dynamic range of the picture, improve the contrast saturation, and improve the overall quality of the output image in response to the above technical problems.
一种图像处理方法,所述方法包括:An image processing method, the method comprising:
对待处理的图像进行图像处理,得到处理图像;Perform image processing on the image to be processed to obtain a processed image;
获取所述处理图像中,各个像素点对应的颜色通道值,对所述颜色通道值进行统计,得到所述处理图像对应的通道统计值;Acquire the color channel value corresponding to each pixel in the processed image, perform statistics on the color channel value, and obtain the channel statistical value corresponding to the processed image;
获取所述处理图像中的饱和度提升像素点,基于所述饱和度提升像素点的各个颜色通道值与所述通道统计值计算得到饱和度提升像素点的各个颜色通道对应的通道颜色比值;Obtaining the saturation enhancement pixel points in the processed image, and calculating the channel color ratio corresponding to each color channel of the saturation enhancement pixel point based on the value of each color channel of the saturation enhancement pixel point and the channel statistical value;
从所述饱和度提升像素点的各个颜色通道对应的通道颜色比值中选取最小值,作为所述饱和度提升像素点的各个颜色通道对应的颜色抑制比值;The minimum value is selected from the channel color ratios corresponding to each color channel of the saturation boosting pixel as the color suppression ratio corresponding to each color channel of the saturation boosting pixel;
基于所述饱和度提升像素点的各个颜色通道对应的颜色抑制比值对所述饱和度提升像 素点的各个颜色通道进行颜色抑制处理,得到目标图像。Color suppression processing is performed on each color channel of the saturation boosting pixel based on the color suppression ratio corresponding to each color channel of the saturation boosting pixel to obtain a target image.
在其中一个实施例中,所述获取所述处理图像中的饱和度提升像素点包括:In one of the embodiments, the acquiring the saturation enhancement pixels in the processed image includes:
获取所述待处理的图像对应的灰度图像;obtaining a grayscale image corresponding to the image to be processed;
根据所述处理图像中各个像素点的像素值以及所述灰度图像中相应位置像素点的像素值,确定所述处理图像中各个像素点相对于所述灰度图像的像素提升比值;According to the pixel value of each pixel in the processed image and the pixel value of the pixel at the corresponding position in the grayscale image, determine the pixel boost ratio of each pixel in the processed image relative to the grayscale image;
将所述处理图像中像素提升比值大于预设阈值的像素点作为饱和度提升像素点。Pixels whose pixel enhancement ratio is greater than a preset threshold in the processed image are used as saturation enhancement pixels.
在其中一个实施例中,所述基于所述饱和度提升像素点的各个颜色通道值与所述通道统计值,计算得到饱和度提升像素点的各个颜色通道对应的通道颜色比值包括:In one of the embodiments, calculating the channel color ratio corresponding to each color channel of the saturation-boosted pixel based on the value of each color channel of the saturation-boosted pixel and the channel statistical value includes:
计算所述饱和度提升像素点的各个颜色通道值相对于所述通道统计值的变化值;Calculate the change value of each color channel value of the saturation boosting pixel point relative to the channel statistical value;
根据所述变化值确定所述饱和度提升像素点的各个颜色通道值对应的调节权重,所述颜色通道值调节权重与所述变化值成负相关关系;Determine the adjustment weight corresponding to each color channel value of the saturation boosting pixel point according to the change value, and the color channel value adjustment weight has a negative correlation with the change value;
根据所述饱和度提升像素点的各个颜色通道值对应的调节权重,计算得到所述饱和度提升像素点的各个颜色通道对应的通道颜色比值。According to the adjustment weights corresponding to the respective color channel values of the saturation boosting pixels, the channel color ratios corresponding to the respective color channels of the saturation boosting pixels are calculated and obtained.
在其中一个实施例中,所述根据所述饱和度提升像素点的各个颜色通道值对应的调节权重,计算得到所述饱和度提升像素点的各个颜色通道对应的通道颜色比值包括:In one of the embodiments, according to the adjustment weights corresponding to the respective color channel values of the saturation enhancement pixels, the calculated channel color ratios corresponding to the respective color channels of the saturation enhancement pixels include:
根据所述饱和度提升像素点的各个颜色通道值对应的调节权重以及所述饱和度提升像素点的像素提升比值的乘积,计算得到第一比值;Calculate the first ratio according to the product of the adjustment weight corresponding to each color channel value of the saturation boosting pixel and the pixel boosting ratio of the saturation boosting pixel;
利用预设值减去所述饱和度提升像素点的各个颜色通道值对应的调节权重,得到第二比值;The second ratio is obtained by subtracting the adjustment weight corresponding to each color channel value of the saturation boosting pixel from the preset value;
将所述第一比值与所述第二比值相加,得到饱和度提升像素点的各个颜色通道对应的通道颜色比值。The first ratio and the second ratio are added to obtain the channel color ratio corresponding to each color channel of the saturation boosting pixel.
在其中一个实施例中,还包括:获取所述灰度图像中像素值大于预设阈值的像素点,作为高光像素点;In one of the embodiments, the method further includes: acquiring pixels whose pixel values are greater than a preset threshold in the grayscale image as highlight pixels;
将所述高光像素点对应的像素提升比值与第一系数进行相乘,得到第三比值;所述第一系数与所述处理图像中,所述高光像素点相应位置像素点的像素值成负相关关系;Multiply the pixel boost ratio corresponding to the highlight pixel point by the first coefficient to obtain a third ratio; the first coefficient and the pixel value of the pixel point corresponding to the highlight pixel point in the processed image are negative relationship;
利用预设值减去所述第一系数,得到第四比值;Subtract the first coefficient from the preset value to obtain a fourth ratio;
将所述第三比值与所述第四比值相加,得到所述高光像素点的各个颜色通道对应的通道颜色比值。The third ratio and the fourth ratio are added to obtain the channel color ratio corresponding to each color channel of the highlight pixel point.
在其中一个实施例中,所述对待处理的图像进行图像处理,得到处理图像包括:In one embodiment, performing image processing on the image to be processed to obtain the processed image includes:
对待处理的图像进行图像处理,得到中间图像;Perform image processing on the image to be processed to obtain an intermediate image;
获取所述待处理的图像对应的灰度图像中像素值小于预设阈值的第一像素点,将所述 中间图像中所述第一像素点对应的像素点作为第二像素点;Obtain the first pixel point whose pixel value is less than the preset threshold in the grayscale image corresponding to the image to be processed, and use the pixel point corresponding to the first pixel point in the intermediate image as the second pixel point;
根据所述灰度图像中所述第一像素点的像素值得到对应的所述第二像素点的噪声抑制权重,所述像素值与所述噪声抑制权重成相关关系;Obtain the noise suppression weight of the corresponding second pixel point according to the pixel value of the first pixel point in the grayscale image, and the pixel value and the noise suppression weight have a correlation;
根据所述噪声抑制权重对所述中间图像中的第二像素点进行噪声抑制,得到处理图像。Noise suppression is performed on the second pixel in the intermediate image according to the noise suppression weight to obtain a processed image.
在其中一个实施例中,所述对待处理的图像进行图像处理,得到处理图像包括:In one embodiment, performing image processing on the image to be processed to obtain the processed image includes:
获取待处理的图像对应的灰度图像;Obtain the grayscale image corresponding to the image to be processed;
对所述灰度图像进行亮化处理,得到亮化图像;Performing a brightening process on the grayscale image to obtain a brightened image;
对所述灰度图像进行对比度增强处理,得到对比度增强图像;performing contrast enhancement processing on the grayscale image to obtain a contrast enhancement image;
对所述灰度图像、所述亮化图像和所述对比度增强图像进行融合处理,得到处理图像。Perform fusion processing on the grayscale image, the brightened image, and the contrast-enhanced image to obtain a processed image.
一种图像处理装置,所述装置包括:An image processing device, the device comprising:
处理图像获取模块,用于对待处理的图像进行图像处理,得到处理图像;The processing image acquisition module is used to perform image processing on the image to be processed to obtain the processed image;
通道统计值获取模块,用于获取所述处理图像中,各个像素点对应的颜色通道值,对所述颜色通道值进行统计,得到所述处理图像对应的通道统计值;a channel statistical value acquisition module, configured to acquire the color channel value corresponding to each pixel in the processed image, perform statistics on the color channel value, and obtain the channel statistical value corresponding to the processed image;
通道颜色比值获取模块,用于获取所述处理图像中的饱和度提升像素点,基于所述饱和度提升像素点的各个颜色通道值与所述通道统计值,计算得到饱和度提升像素点的各个颜色通道对应的通道颜色比值;The channel color ratio acquisition module is used to acquire the saturation enhancement pixel points in the processed image, and based on the respective color channel values of the saturation enhancement pixel points and the channel statistical values, calculate and obtain each saturation enhancement pixel point. The channel color ratio corresponding to the color channel;
颜色抑制比值获取模块,用于从所述饱和度提升像素点的各个颜色通道对应的通道颜色比值中选取最小值,作为所述饱和度提升像素点的各个颜色通道对应的颜色抑制比值;A color suppression ratio acquisition module, configured to select a minimum value from the channel color ratios corresponding to each color channel of the saturation boosting pixel as the color suppression ratio corresponding to each color channel of the saturation boosting pixel;
目标图像获取模块,用于基于所述饱和度提升像素点的各个颜色通道对应的颜色抑制比值对所述饱和度提升像素点的各个颜色通道进行颜色抑制处理,得到目标图像。A target image acquisition module, configured to perform color suppression processing on each color channel of the saturation enhancement pixel based on the color suppression ratio corresponding to each color channel of the saturation enhancement pixel to obtain a target image.
一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现以下步骤:A computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
对待处理的图像进行图像处理,得到处理图像;Perform image processing on the image to be processed to obtain a processed image;
获取所述处理图像中各个像素点对应的颜色通道值,对所述颜色通道值进行统计,得到所述处理图像对应的通道统计值;Obtaining the color channel value corresponding to each pixel in the processed image, and performing statistics on the color channel value to obtain the channel statistical value corresponding to the processed image;
获取所述处理图像中的饱和度提升像素点,基于所述饱和度提升像素点的各个颜色通道值与所述通道统计值,计算得到饱和度提升像素点的各个颜色通道对应的通道颜色比值;Acquire the saturation enhancement pixel points in the processed image, and calculate the channel color ratio corresponding to each color channel of the saturation enhancement pixel point based on the value of each color channel of the saturation enhancement pixel point and the channel statistical value;
从所述饱和度提升像素点的各个颜色通道对应的通道颜色比值中选取最小值,作为所述饱和度提升像素点的各个颜色通道对应的颜色抑制比值;The minimum value is selected from the channel color ratios corresponding to each color channel of the saturation boosting pixel as the color suppression ratio corresponding to each color channel of the saturation boosting pixel;
基于所述饱和度提升像素点的各个颜色通道对应的颜色抑制比值,对所述饱和度提升像素点的各个颜色通道进行颜色抑制处理,得到目标图像。Based on the color suppression ratios corresponding to the respective color channels of the saturation-enhanced pixels, color suppression processing is performed on the respective color channels of the saturation-enhanced pixels to obtain a target image.
一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现以下步骤:A computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
对待处理的图像进行图像处理,得到处理图像;Perform image processing on the image to be processed to obtain a processed image;
获取所述处理图像中各个像素点对应的颜色通道值,对所述颜色通道值进行统计,得到所述处理图像对应的通道统计值;Obtaining the color channel value corresponding to each pixel in the processed image, and performing statistics on the color channel value to obtain the channel statistical value corresponding to the processed image;
获取所述处理图像中的饱和度提升像素点,基于所述饱和度提升像素点的各个颜色通道值与所述通道统计值,计算得到饱和度提升像素点的各个颜色通道对应的通道颜色比值;Acquire the saturation enhancement pixel points in the processed image, and calculate the channel color ratio corresponding to each color channel of the saturation enhancement pixel point based on the value of each color channel of the saturation enhancement pixel point and the channel statistical value;
从所述饱和度提升像素点的各个颜色通道对应的通道颜色比值中选取最小值,作为所述饱和度提升像素点的各个颜色通道对应的颜色抑制比值;The minimum value is selected from the channel color ratios corresponding to each color channel of the saturation boosting pixel as the color suppression ratio corresponding to each color channel of the saturation boosting pixel;
基于所述饱和度提升像素点的各个颜色通道对应的颜色抑制比值,对所述饱和度提升像素点的各个颜色通道进行颜色抑制处理,得到目标图像。Based on the color suppression ratios corresponding to the respective color channels of the saturation-enhanced pixels, color suppression processing is performed on the respective color channels of the saturation-enhanced pixels to obtain a target image.
有益效果beneficial effect
上述图像处理方法、装置、计算机设备和存储介质,经过对待处理的图像进行图像处理后,得到处理图像,获取此处理图像中各个像素点对应的颜色通道值,并通过对颜色通道值进行统计,得到处理图像对应的通道统计值;再通过获取上述处理图像中的饱和度提升像素点,基于饱和度提升像素点的各个颜色通道值与通道统计值计算得到颜色通道对应的通道颜色比值,从通道颜色比值中选取最小值,作为饱和度提升像素点对应的颜色抑制比值,因此能够对饱和度高的像素点进行颜色抑制处理,提高了图像处理效果。The above image processing method, device, computer equipment and storage medium, after image processing is performed on the image to be processed, a processed image is obtained, the color channel value corresponding to each pixel in the processed image is obtained, and the color channel value is counted. Obtain the channel statistical value corresponding to the processed image; and then obtain the saturation enhancement pixel in the above-mentioned processed image, and calculate the channel color ratio corresponding to the color channel based on each color channel value of the saturation enhanced pixel and the channel statistical value. The minimum value among the color ratios is selected as the color suppression ratio corresponding to the saturation enhancement pixel, so the color suppression processing can be performed on the pixels with high saturation, which improves the image processing effect.
附图说明Description of drawings
图1为一个实施例中图像处理方法的应用环境图;Fig. 1 is the application environment diagram of the image processing method in one embodiment;
图2为图像处理方法的流程示意图;Fig. 2 is a schematic flowchart of an image processing method;
图3为一个实施例中获取处理图像中的饱和度提升像素点方法的流程示意图;FIG. 3 is a schematic flowchart of a method for obtaining saturation-boosting pixels in a processed image in one embodiment;
图4为另一个实施例中获取处理图像中的饱和度提升像素点方法的流程示意图;FIG. 4 is a schematic flowchart of a method for obtaining saturation-boosting pixels in a processed image in another embodiment;
图5为另一个实施例中获取处理图像中的饱和度提升像素点方法的流程示意图;FIG. 5 is a schematic flowchart of a method for obtaining saturation-boosting pixels in a processed image in another embodiment;
图6为另一个实施例中图像处理方法的流程示意图;6 is a schematic flowchart of an image processing method in another embodiment;
图7为一个实施例中对待处理的图像进行图像处理,得到处理图像方法的流程示意图;7 is a schematic flowchart of an image processing method to obtain an image processing method in an embodiment;
图8为另一个实施例中对待处理的图像进行图像处理,得到处理图像方法的流程示意图;8 is a schematic flowchart of a method for processing an image by performing image processing on an image to be processed in another embodiment;
图9为一个实施例中图像处理装置的结构框图;9 is a structural block diagram of an image processing apparatus in one embodiment;
图10为一个实施例中计算机设备的内部结构图。Figure 10 is a diagram of the internal structure of a computer device in one embodiment.
本发明的实施方式Embodiments of the present invention
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application will be described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application.
本申请提供的图像处理方法,可以应用于如图1所示的应用环境中。应用环境包括图像采集设备102与终端104,其中,图像采集设备102与终端104通信连接。图像采集设备102采集到待处理图像后,传输给终端104,终端104获取待处理图像,终端104可以对获取的待处理图像的各个像素点对应的颜色通道值,对颜色通道值进行统计,得到处理图像对应的通道统计值;并且获取处理图像中的饱和度提升像素点,基于上述饱和度提升像素点的各个颜色通道值与通道统计值计算得到颜色通道对应的通道颜色比值;从饱和度提升像素点对应的各个颜色通道对应的通道颜色比值中选取最小值,作为饱和度提升像素点对应的颜色抑制比值;基于饱和度提升像素点对应的颜色抑制比值对饱和度提升像素点进行颜色抑制处理,得到目标图像。其中,图像采集设备102可以但不限于是各种有图像采集功能的设备,可以分布于终端104的外部,也可以分布于终端104的内部。例如:分布于终端104的外部的各种摄像头、扫描仪、各种相机、图像采集卡。终端104可以但不限于是各种相机、个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备。The image processing method provided in this application can be applied to the application environment shown in FIG. 1 . The application environment includes an image capturing device 102 and a terminal 104 , wherein the image capturing device 102 and the terminal 104 are connected in communication. After the image acquisition device 102 collects the image to be processed, it is transmitted to the terminal 104, and the terminal 104 obtains the image to be processed. The terminal 104 can count the color channel values corresponding to each pixel of the obtained image to be processed, and obtain Process the channel statistics corresponding to the image; and obtain the saturation enhancement pixels in the processed image, and calculate the channel color ratio corresponding to the color channel based on the respective color channel values and the channel statistics of the above saturation enhancement pixels; Select the minimum value among the channel color ratios corresponding to each color channel corresponding to the pixel, as the color suppression ratio corresponding to the saturation boosting pixel; perform color suppression processing on the saturation boosting pixel based on the color suppression ratio corresponding to the saturation boosting pixel , get the target image. The image capturing device 102 may be, but is not limited to, various devices having an image capturing function, and may be distributed outside the terminal 104 or inside the terminal 104 . For example: various cameras, scanners, various cameras, and image capture cards distributed outside the terminal 104 . The terminal 104 may be, but is not limited to, various cameras, personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices.
可以理解,本申请实施例提供的方法,也可以是由服务器执行的。It can be understood that the method provided by the embodiment of the present application may also be executed by a server.
在一个实施例中,如图2所示,提供了一种图像处理方法,以该方法应用于图1中的终端为例进行说明,包括以下步骤:In one embodiment, as shown in FIG. 2, an image processing method is provided, and the method is applied to the terminal in FIG. 1 as an example for description, including the following steps:
步骤202,对待处理的图像进行图像处理,得到处理图像。Step 202: Perform image processing on the image to be processed to obtain a processed image.
其中,处理图像是指经过图像处理后的图像。The processed image refers to an image after image processing.
具体地,终端可以使用实时获取的图像作为待处理图像,待处理图像的显示效果并不理想,因此需要将待处理图像进行图像处理,得到处理图像。Specifically, the terminal may use the image acquired in real time as the image to be processed, and the display effect of the image to be processed is not ideal, so it is necessary to perform image processing on the image to be processed to obtain the processed image.
在一个实施例中,终端也可以通过从存储有图像的存储器中获取到待处理图像,并对待处理图像进行图像处理,得到处理图像。In one embodiment, the terminal may also obtain the processed image by acquiring the to-be-processed image from the memory storing the image, and performing image processing on the to-be-processed image.
在一个实施例中,可以对待处理图像进行灰度处理得到灰度图像,并且对灰度图像进行亮化处理获取亮化图像,对灰度图像进行对比度增强处理,得到对比度增强图像,对上述灰度图像、亮化图像和对比度增强图像进行融合处理,得到中间的处理图像,可以将此时得到的中间的处理图像作为处理图像。In one embodiment, a grayscale image may be obtained by performing grayscale processing on the image to be processed, and a brightened image may be obtained by performing a brightening process on the grayscale image, and a contrast enhancement process may be performed on the grayscale image to obtain a contrast enhanced image. The brightness image, the brightened image and the contrast enhanced image are fused to obtain the intermediate processed image, and the intermediate processed image obtained at this time can be used as the processed image.
进一步地,在一个实施例中,选择上述实施例中通过灰度图像、亮化图像和对比度增强图像融合处理得到的中间的处理图像,还可以进一步进行噪声抑制处理,将得到的处理图像作为处理图像。Further, in one embodiment, the intermediate processed image obtained by the fusion processing of the grayscale image, the brightened image and the contrast enhanced image in the above-mentioned embodiment is selected, and noise suppression processing may be further performed, and the obtained processed image is used as the processing image. image.
进一步地,上述实施例中对中间的处理图像(即中间图像)进行噪声抑制处理,具体可以为:Further, in the above embodiment, noise suppression processing is performed on the intermediate processed image (ie, the intermediate image), which may specifically be:
获取待处理的图像对应的灰度图像中像素值小于预设阈值的第一像素点,将中间图像中所述第一像素点对应的像素点作为第二像素点;Obtaining the first pixel point in the grayscale image corresponding to the image to be processed whose pixel value is less than the preset threshold, and using the pixel point corresponding to the first pixel point in the intermediate image as the second pixel point;
根据灰度图像中第一像素点的像素值得到对应的第二像素点的噪声抑制权重,像素值与噪声抑制权重成相关关系;The noise suppression weight of the corresponding second pixel point is obtained according to the pixel value of the first pixel point in the grayscale image, and the pixel value and the noise suppression weight have a correlation;
根据噪声抑制权重对中间图像中的第二像素点进行噪声抑制,得到处理图像。Noise suppression is performed on the second pixel in the intermediate image according to the noise suppression weight to obtain a processed image.
步骤204,获取处理图像中各个像素点对应的颜色通道值,对颜色通道值进行统计,得到处理图像对应的通道统计值。Step 204: Acquire color channel values corresponding to each pixel in the processed image, perform statistics on the color channel values, and obtain channel statistical values corresponding to the processed image.
其中,颜色通道值是指将每个像素点分成R(红)G(绿)B(蓝)三通道后,每个通道的值。每个通道的值可以使用每个通道对应的像素值表示。例如,某个像素点,RGB三通道的颜色通道值分别是199、237和204。通道统计值是指能够体现颜色通道值整体数据特点的颜色通道值。通道统计值可以指三个颜色通道值的平均值,也可以是中位数等。The color channel value refers to the value of each channel after each pixel is divided into three channels: R (red), G (green), and B (blue). The value of each channel can be represented using the corresponding pixel value for each channel. For example, for a certain pixel, the color channel values of the RGB three channels are 199, 237 and 204 respectively. The channel statistics value refers to the color channel value that can reflect the overall data characteristics of the color channel value. The channel statistics can refer to the average of the three color channel values, or the median, etc.
具体的,终端可以通过获取处理图像,使用自带的像素点分析软件或者分析工具对各个像素点对应的颜色通道值进行检测,并通过计算得到处理图像对应的通道统计值。Specifically, the terminal can acquire the processed image, use its own pixel point analysis software or analysis tool to detect the color channel value corresponding to each pixel point, and obtain the channel statistical value corresponding to the processed image through calculation.
步骤206,获取处理图像中的饱和度提升像素点,基于饱和度提升像素点的各个颜色通道值与通道统计值,计算得到饱和度提升像素点的各个颜色通道对应的通道颜色比值。Step 206: Acquire the saturation enhancement pixels in the processed image, and calculate the channel color ratio corresponding to each color channel of the saturation enhancement pixel based on the value of each color channel and the channel statistics value of the saturation enhancement pixel.
其中,饱和度提升像素点是指处理图像的像素点的饱和度,相对于待处理图像中的原始像素度点的饱和度有所提升的像素点。通道颜色比值是指每个像素点中RGB三通道颜色相对应每个像素点的分别占比。Wherein, the saturation-enhanced pixel points refer to the pixel points whose saturation degree of the processed image point is improved relative to the saturation degree of the original pixel degree point in the to-be-processed image. The channel color ratio refers to the respective proportions of the RGB three-channel colors in each pixel corresponding to each pixel.
具体的,在获取到各个像素点对应的颜色通道值之后,通过计算得到处理图像对应的通道统计值,并且获取处理图像中的饱和度提升像素点,基于处理图像中的饱和度提升像素点得到通道颜色比值。Specifically, after acquiring the color channel value corresponding to each pixel point, the channel statistics value corresponding to the processed image is obtained by calculation, and the saturation enhancement pixel point in the processed image is acquired, and based on the saturation enhancement pixel point in the processed image, the obtained Channel color ratio.
在一个实施例中,图像的某一通道颜色饱和度与对应的通道统计值的差值的绝对值成正相关关系。颜色通道值与处理图像的差值的绝对值越大,则图像的某一通道颜色饱和度越高。例如,RGB三通道中R代表的红色的颜色通道值与处理图像的差值的绝对值越大,表明R通道的红色饱和度越高,在图像中的表现为图像中的红色越红。In one embodiment, the color saturation of a certain channel of the image has a positive correlation with the absolute value of the difference between the corresponding channel statistical values. The greater the absolute value of the difference between the color channel value and the processed image, the higher the color saturation of a certain channel of the image. For example, the greater the absolute value of the difference between the red color channel value represented by R in the three RGB channels and the processed image, the higher the red saturation of the R channel, and the redder the red in the image.
步骤208,从饱和度提升像素点的各个颜色通道对应的通道颜色比值中选取最小值,作为饱和度提升像素点的各个颜色通道对应的颜色抑制比值。Step 208: Select the minimum value from the channel color ratios corresponding to each color channel of the saturation boosting pixel as the color suppression ratio corresponding to each color channel of the saturation boosting pixel.
其中,颜色抑制比值是指能够抑制颜色饱和度过大而使用的比值,通过该比值与相应的通道颜色建立函数关系,能够提高图像处理效果。The color suppression ratio refers to a ratio used to suppress excessive color saturation. By establishing a functional relationship between the ratio and the corresponding channel color, the image processing effect can be improved.
具体的,因为此通道颜色比值是大于1的数值,此数值越接近1,图像的饱和度越高,所以在通道颜色比值中选取的最小值为最接近1的数值,把此数值作为颜色抑制比值,基于此颜色抑制比值对饱和度提升像素点进行颜色抑制处理,得到目标图像。Specifically, because the channel color ratio is a value greater than 1, the closer the value is to 1, the higher the saturation of the image, so the minimum value selected in the channel color ratio is the value closest to 1, and this value is used as color suppression Ratio, based on this color suppression ratio, the color suppression processing is performed on the saturation enhancement pixels to obtain the target image.
步骤210,基于饱和度提升像素点的各个颜色通道对应的颜色抑制比值对饱和度提升像素点的各个颜色通道进行颜色抑制处理,得到目标图像。Step 210 , performing color suppression processing on each color channel of the saturation boosting pixel based on the color suppression ratio corresponding to each color channel of the saturation boosting pixel to obtain a target image.
在一个实施例中,在获取到颜色抑制比值之后,将饱和度提升像素点的像素值与颜色抑制比值建立函数关系,从而获取到建立函数关系后得到的像素点的像素值,从而起到颜色抑制处理的效果,得到目标图像。In one embodiment, after the color suppression ratio is obtained, a functional relationship is established between the pixel value of the saturation boosting pixel and the color suppression ratio, so as to obtain the pixel value of the pixel obtained after the functional relationship is established, so as to play the role of color The effect of the processing is suppressed, and the target image is obtained.
在一个实施例中,饱和度提升像素点与颜色抑制比值建立函数关系可以是将颜色抑制比值作为系数,将饱和度提升像素点的像素值乘以颜色抑制比值,从而得到抑制处理的像素点,从而得到目标图像。In one embodiment, establishing a functional relationship between the saturation enhancement pixel and the color suppression ratio may be that the color suppression ratio is used as a coefficient, and the pixel value of the saturation enhancement pixel is multiplied by the color suppression ratio, so as to obtain the suppressed pixel, Thereby obtaining the target image.
上述图像处理方法中,经过对待处理的图像进行图像处理后,得到处理图像,获取此处理图像中,各个像素点对应的颜色通道值,并通过对颜色通道值进行统计,得到处理图像对应的通道统计值;再通过获取上述处理图像中的饱和度提升像素点,基于饱和度提升像素点的各个颜色通道值与通道统计值计算得到颜色通道对应的通道颜色比值,从通道颜色比值中选取最小值,作为饱和度提升像素点对应的颜色抑制比值,因此能够对饱和度高的像素点进行颜色抑制处理,提高了图像处理效果。In the above image processing method, after image processing is performed on the image to be processed, a processed image is obtained, the color channel value corresponding to each pixel in the processed image is obtained, and the channel corresponding to the processed image is obtained by counting the color channel values. Statistical value; then by obtaining the saturation enhancement pixels in the above-mentioned processed image, the channel color ratio corresponding to the color channel is calculated based on the value of each color channel of the saturation enhancement pixel and the channel statistical value, and the minimum value is selected from the channel color ratio. , as the color suppression ratio corresponding to the saturation enhancement pixel, so the color suppression processing can be performed on the pixel with high saturation, which improves the image processing effect.
在一个实施例中,如图3所示,步骤获取处理图像中的饱和度提升像素点包括:In one embodiment, as shown in FIG. 3 , the step of acquiring and processing the saturation-boosting pixels in the image includes:
步骤302,获取待处理的图像对应的灰度图像。Step 302: Obtain a grayscale image corresponding to the image to be processed.
其中,灰度图像是指将图像从黑色到白色分成若干的等级的图像。灰度图像可以使图像的过渡更加平滑细腻。Here, the grayscale image refers to an image in which the image is divided into several levels from black to white. Grayscale image can make the transition of the image more smooth and delicate.
在一个实施例中,可以将待处理的图像进行相应的转换,得到转换后的灰度图像。可以通过对待处理的图像进行相应的数学运算,获得待处理的图像对应的灰度图像。例如,将灰度图像表示为Gray,将待处理的图像像素的三个通道的通道颜色值分别表示为R、G和B,可以通过浮点算法:Gray=R*0.3+G*0.59+B*0.11,计算得到灰度图像。In one embodiment, the image to be processed may be correspondingly converted to obtain a converted grayscale image. A grayscale image corresponding to the image to be processed can be obtained by performing corresponding mathematical operations on the image to be processed. For example, to represent a grayscale image as Gray, and to represent the channel color values of the three channels of the image pixel to be processed as R, G, and B, respectively, floating-point arithmetic can be used: Gray=R*0.3+G*0.59+B *0.11, the grayscale image is obtained by calculation.
步骤304,根据处理图像中各个像素点的像素值以及灰度图像中相应位置像素点的像素值,确定处理图像确定处理图像中各个像素点相对于灰度图像的像素提升比值。Step 304, according to the pixel value of each pixel in the processed image and the pixel value of the pixel at the corresponding position in the grayscale image, determine the pixel boost ratio of each pixel in the processed image relative to the grayscale image.
其中,像素提升比值是指处理图像中各个像素点的像素值相对于灰度图像中相应位置像素点的像素值的增强程度。The pixel enhancement ratio refers to the enhancement degree of the pixel value of each pixel point in the processed image relative to the pixel value of the pixel point at the corresponding position in the grayscale image.
具体的,像素点的像素值为数值,此数值与饱和度之间为正相关关系,通过此数值可以确定处理图像确定处理图像相对于灰度图像的像素提升比值。Specifically, the pixel value of the pixel point is a numerical value, and there is a positive correlation between the numerical value and the saturation, through which the processing image can be determined to determine the pixel enhancement ratio of the processing image relative to the grayscale image.
在一个实施例中,可以通过处理图像中各个像素点的像素值以及灰度图像中相应位置像素点的像素值之间的倍数关系来表示处理图像确定处理图像相对于灰度图像的像素提升比值。例如,假设处理图像各个像素点的像素值表示为I,灰度图像中相应位置像素点的像素值表示为I1,处理图像确定处理图像相对于灰度图像的像素提升比值表示为ratio src,则三者之间的关系可表示为:ratio src=(I+1)/(I1+1) In one embodiment, the pixel value of the processed image to determine the pixel enhancement ratio of the processed image relative to the grayscale image can be represented by the multiple relationship between the pixel value of each pixel point in the processed image and the pixel value of the corresponding pixel point in the grayscale image. . For example, assuming that the pixel value of each pixel of the processed image is represented as I, the pixel value of the pixel at the corresponding position in the grayscale image is represented as I1, and the processing image determines that the pixel enhancement ratio of the processed image relative to the grayscale image is represented as ratio src , then The relationship between the three can be expressed as: ratio src= (I+1)/(I1+1)
步骤306,将处理图像中像素提升比值大于预设阈值的像素点作为饱和度提升像素点。Step 306 , the pixels whose pixel enhancement ratio is greater than the preset threshold in the processed image are regarded as saturation enhancement pixels.
其中,预设阈值是指设置的临界值,当大于此临界值时,将满足条件的像素点作为饱和度提升像素点;当小于此临界值时,无需对满足条件的像素点作为饱和度提升像素点。Among them, the preset threshold refers to the set critical value. When it is greater than the critical value, the pixels that meet the conditions are used as saturation enhancement pixels; when it is less than the critical value, the pixels that meet the conditions do not need to be used as saturation enhancement pixels. pixel.
具体的,在获取像素提升比值之后,可以通过预设阈值的形式,将需要饱和度提升像素点筛选出来,对筛选出来的这部分像素进行饱和度的调整。Specifically, after obtaining the pixel boost ratio, the pixels that need to be increased in saturation can be screened out in the form of a preset threshold, and the saturation of the screened out pixels can be adjusted.
在一个实施例中,预设阈值可以设置为固定数值,当大于此固定数值时,将满足条件的像素点筛选出来作为要提升饱和度的像素点;可以理解的,当小于此固定数值时,则满足条件的像素点不作为提升饱和度的像素点。例如,固定数值为1,则像素提升比值为ratio src,则ratio src大于1时,将满足条件的处理图像中的相应像素点筛选出来做饱和度提升处理;ratio src小于1时,则将满足此条件的处理图像中的像素点不做饱和度提升处理。 In one embodiment, the preset threshold value can be set to a fixed value, and when it is greater than the fixed value, the pixels that meet the conditions are screened out as the pixels whose saturation is to be improved; it can be understood that when it is less than this fixed value, Then the pixels that meet the conditions are not used as pixels to enhance the saturation. For example, if the fixed value is 1, the pixel boost ratio is ratio src , and when ratio src is greater than 1, the corresponding pixels in the processed image that meet the conditions will be screened out for saturation boost processing; when ratio src is less than 1, it will satisfy the The pixels in the processed image under this condition do not undergo saturation enhancement processing.
本实施例中,通过确定处理图像确定处理图像相对于灰度图像的像素提升比值,并对上述像素提升比值设置预设阈值,通过预设阈值筛选出饱和度提升像素点,能够达到准确确定饱和度提升像素点的目的。In this embodiment, the pixel enhancement ratio of the processed image relative to the grayscale image is determined by determining the processing image, a preset threshold is set for the pixel enhancement ratio, and the saturation enhancement pixels are screened out through the preset threshold, so that the saturation enhancement can be accurately determined. The purpose of improving the pixel point.
在一个实施例中,如图4所示,步骤基于饱和度提升像素点的各个颜色通道值与通道统计值,计算得到饱和度提升像素点的各个颜色通道对应的通道颜色比值包括:In one embodiment, as shown in FIG. 4 , the steps are based on the value of each color channel and the statistical value of the channel of the pixel point of saturation enhancement, and the calculated channel color ratio corresponding to each color channel of the pixel point of saturation enhancement includes:
步骤402,计算饱和度提升像素点的各个颜色通道值相对于通道统计值的变化值。Step 402: Calculate the change value of each color channel value of the saturation boosting pixel point relative to the channel statistical value.
在一个实施例中,各个饱和度提升像素点的颜色通道值相对于通道统计值的变化值可以是各个饱和度提升像素点的颜色通道值相对于通道统计值的差值。例如,假设任一饱和度提升像素点的颜色通道值为c,通道统计值为avg,对应饱和度提升像素点的颜色通道值相对于通道统计值的变化值为d,则d表示为:d=c-avgIn one embodiment, the change value of the color channel value of each saturation-boosting pixel point relative to the channel statistical value may be a difference value of the color channel value of each saturation-boosting pixel point relative to the channel statistical value. For example, assuming that the color channel value of any saturation boosting pixel is c, the channel statistic value is avg, and the change value of the color channel value of the corresponding saturation boosting pixel relative to the channel statistic value is d, then d is expressed as: d =c-avg
步骤404,根据变化值确定饱和度提升像素点的各个颜色通道值对应的调节权重,颜色通道值调节权重与变化值成负相关关系。Step 404: Determine the adjustment weights corresponding to each color channel value of the saturation boosting pixel point according to the change value, and the adjustment weight of the color channel value has a negative correlation with the change value.
其中,调节权重是指各个饱和度提升像素点的各个颜色通道值所需要调节的重要程度。其与变化值成负相关关系,变化值越大,调节权重越小,变化值越小,调节权重越大。The adjustment weight refers to the degree of importance that needs to be adjusted for each color channel value of each saturation enhancement pixel. It has a negative correlation with the change value, the larger the change value, the smaller the adjustment weight, and the smaller the change value, the larger the adjustment weight.
在一个实施例中,可以通过变化值与调节权重之间的函数关系来表示调节权重。例如,任一通道调节权重表示为w(c,avg),则变化值d与该颜色通道值调节权重w(c,avg)之间的 函数关系可表示为:In one embodiment, the adjustment weight may be represented by a functional relationship between the change value and the adjustment weight. For example, if any channel adjustment weight is expressed as w(c,avg), the functional relationship between the change value d and the color channel value adjustment weight w(c,avg) can be expressed as:
Figure PCTCN2021136086-appb-000001
Figure PCTCN2021136086-appb-000001
步骤406,根据饱和度提升像素点的各个颜色通道值对应的调节权重,计算得到饱和度提升像素点的各个颜色通道对应的通道颜色比值。Step 406: Calculate the channel color ratio corresponding to each color channel of the saturation boosting pixel according to the adjustment weight corresponding to each color channel value of the saturation boosting pixel.
具体的,通过饱和度提升像素点对应的调节权重w(c,avg),以及像素提升比值ratio src,可以计算得到各个饱和度提升像素点的颜色通道对应的通道颜色比值ratio cSpecifically, through the adjustment weight w(c, avg) corresponding to the saturation enhancement pixel, and the pixel enhancement ratio ratio src , the channel color ratio ratio c corresponding to the color channel of each saturation enhancement pixel can be calculated.
在一个实施例中,饱和度提升像素点的各个颜色通道值对应的调节权重与饱和度提升像素点的各个颜色通道对应的通道颜色比值存在正相关关系,饱和度提升像素点的各个颜色通道值对应的调节权重越大,饱和度提升像素点的各个颜色通道对应的通道颜色比值越高。In one embodiment, there is a positive correlation between the adjustment weight corresponding to each color channel value of the saturation boosting pixel and the channel color ratio corresponding to each color channel of the saturation boosting pixel, and the value of each color channel of the saturation boosting pixel The larger the corresponding adjustment weight, the higher the channel color ratio corresponding to each color channel of the saturation boosting pixel.
例如,饱和度提升像素点的各个颜色通道对应的通道颜色比值ratio c可以表示为: For example, the channel color ratio ratio c corresponding to each color channel of the saturation boosting pixel can be expressed as:
ratio c=ratio src*w(c,avg)+(1-w(c,avg))*1 ratio c = ratio src *w(c,avg)+(1-w(c,avg))*1
本实施例中,通过饱和度提升像素点的各个颜色通道值相对于通道统计值的变化值获取各个饱和度提升像素点的各个颜色通道值对应的调节权重,通过调节权重能够达到获取通道颜色比值的目的。In this embodiment, the adjustment weight corresponding to each color channel value of each saturation enhancement pixel is obtained by the change value of each color channel value of the saturation enhancement pixel relative to the channel statistical value, and the channel color ratio can be obtained by adjusting the weight. the goal of.
在一个实施例中,如图5所示,步骤根据饱和度提升像素点的各个颜色通道值对应的调节权重,计算得到饱和度提升像素点的各个颜色通道对应的通道颜色比值包括:In one embodiment, as shown in FIG. 5 , the steps are based on the adjustment weights corresponding to the respective color channel values of the saturation boosting pixels, and the calculated channel color ratios corresponding to the respective color channels of the saturation boosting pixels include:
步骤502,根据饱和度提升像素点的各个颜色通道值对应的调节权重以及饱和度提升像素点的像素提升比值的乘积,计算得到第一比值。Step 502: Calculate the first ratio according to the product of the adjustment weight corresponding to each color channel value of the saturation boosting pixel and the pixel boosting ratio of the saturation boosting pixel.
具体的,第一比值表示为ratio c1,则可以通过以下公式计算得到: Specifically, the first ratio is expressed as ratio c1 , which can be calculated by the following formula:
ratio c1=ratio src*w(c,avg) ratio c1 = ratio src *w(c,avg)
步骤504,利用预设值减去饱和度提升像素点的各个颜色通道值对应的调节权重,得到第二比值。Step 504, using the preset value to subtract the adjustment weight corresponding to each color channel value of the saturation boosting pixel to obtain the second ratio.
具体的,第二比值表示为ratio c2,预设值为e,则ratio c2可表示为: Specifically, the second ratio is expressed as ratio c2 , and the default value is e, then ratio c2 can be expressed as:
ratio c2=e-w(c,avg) ratio c2 =ew(c,avg)
在一个实施例中,预设值e可以为1,则第二比值ratio c2可以表示为: In one embodiment, the preset value e may be 1, and the second ratio ratio c2 may be expressed as:
ratio c2=1-w(c,avg) ratio c2 =1-w(c,avg)
步骤506,将第一比值与第二比值相加,得到饱和度提升像素点的各个颜色通道对应的通道颜色比值。Step 506 , adding the first ratio and the second ratio to obtain the channel color ratio corresponding to each color channel of the pixel point with increased saturation.
具体的,通道颜色比值表示为ratio c,第一比值表示为ratio c1,第二比值表示为ratio c2,则通道颜色比值ratio c可表示为: Specifically, the channel color ratio is expressed as ratio c , the first ratio is expressed as ratio c1 , and the second ratio is expressed as ratio c2 , then the channel color ratio ratio c can be expressed as:
ratio c=ratio c1+ratio c2 ratio c = ratio c1 + ratio c2
本实施例中,通过饱和度提升像素点的各个颜色通道值对应的调节权重以及饱和度提升像素点的像素提升比值的乘积得到第一比值,并利用预设值减去饱和度提升像素点对应的调节权重,得到第二比值,通过第一比值和第二比值能够达到获取颜色通道对应的通道颜色比值的目的,以便于选择该通道颜色比值中最小值作为颜色抑制比值,通过该颜色抑制比值对图像进行颜色抑制处理,得到目标图像。In this embodiment, the first ratio is obtained by multiplying the adjustment weight corresponding to each color channel value of the saturation boosting pixel and the pixel boosting ratio of the saturation boosting pixel, and the preset value is used to subtract the saturation boosting pixel corresponding to The purpose of obtaining the channel color ratio corresponding to the color channel can be achieved through the first ratio and the second ratio, so as to select the minimum value in the color ratio of the channel as the color suppression ratio, and use the color suppression ratio Perform color suppression processing on the image to obtain the target image.
在一个实施例中,如图6所示,步骤图像处理方法还包括:In one embodiment, as shown in Figure 6, the step image processing method further includes:
步骤602,获取灰度图像中像素值大于预设阈值的像素点,作为高光像素点。Step 602: Acquire the pixel points whose pixel value is greater than the preset threshold in the grayscale image, as the highlight pixel points.
其中,高光像素点是指像素值较高的像素点。Among them, the highlight pixel refers to the pixel with higher pixel value.
具体的,通过对像素值设置预设阈值,将像素值大于预设阈值的像素点,作为高光像素点;将像素值小于等于预设阈值的像素点不列入高光像素点的范围。可以理解的,高光像素点对图像的质量有影响,图像存在的高光像素点越多,图像的质量越差。Specifically, by setting a preset threshold for pixel values, pixels with pixel values greater than the preset threshold are regarded as highlight pixels; pixels with pixel values less than or equal to the preset threshold are not included in the range of highlight pixels. It can be understood that the highlight pixels have an impact on the quality of the image. The more highlight pixels there are in the image, the worse the image quality.
步骤604,将高光像素点对应的像素提升比值与第一系数进行相乘,得到第三比值;Step 604: Multiply the pixel boost ratio corresponding to the highlight pixel point by the first coefficient to obtain a third ratio;
具体的,高光像素点对应的像素提升比值表示为ratio src,第一系数表示为f,第三比值表示为ratio c3,则第三比值表示为ratio c3可以表示为: Specifically, the pixel enhancement ratio corresponding to the highlight pixel is expressed as ratio src , the first coefficient is expressed as f, and the third ratio is expressed as ratio c3 , then the third ratio expressed as ratio c3 can be expressed as:
ratio c3=ratio src*f ratio c3 = ratio src *f
第一系数f与处理图像中的高光像素点相应位置像素点的像素值I成负相关关系。第一系数f可表示为:The first coefficient f has a negative correlation with the pixel value I of the pixel point at the corresponding position of the highlight pixel point in the processed image. The first coefficient f can be expressed as:
Figure PCTCN2021136086-appb-000002
Figure PCTCN2021136086-appb-000002
α=255-预设阈值α=255 - preset threshold
在一个实施例中,预设阈值可以为230,将灰度图像中像素值大于230的像素点,作为高光像素点。通过预设阈值可以得到第一系数f。In one embodiment, the preset threshold may be 230, and pixels with pixel values greater than 230 in the grayscale image are used as highlight pixels. The first coefficient f can be obtained by a preset threshold.
步骤606,利用预设值减去第一系数,得到第四比值。Step 606 , subtract the first coefficient from the preset value to obtain a fourth ratio.
具体的,预设值标识为g,第四比值表示为ratio c4,则第四比值ratio c4表示为: Specifically, the preset value is identified as g, and the fourth ratio is expressed as ratio c4 , then the fourth ratio ratio c4 is expressed as:
ratio c4=g-f ratio c4 = gf
在一个实施例中,预设值为1,则第四比值ratio c4表示为: In one embodiment, the preset value is 1, and the fourth ratio ratio c4 is expressed as:
ratio c4=1-f ratio c4 = 1-f
步骤608,将第三比值与第四比值相加,得到高光像素点的各个颜色通道对应的通道颜色比值。Step 608 , adding the third ratio and the fourth ratio to obtain the channel color ratio corresponding to each color channel of the highlight pixel point.
具体的,高光像素点的颜色通道对应的通道颜色比值表示为ratio c',则ratio c'表示为: Specifically, the channel color ratio corresponding to the color channel of the highlight pixel is expressed as ratio c' , then ratio c' is expressed as:
ratio c'=ratio c3+ratio c4 ratio c' =ratio c3 +ratio c4
在一个实施例中,三通道分别乘以比值ratio c',可以获取高光像素点的颜色通道对应的通道颜色比值。 In one embodiment, the three channels are respectively multiplied by the ratio ratio c' to obtain the channel color ratio corresponding to the color channel of the highlight pixel point.
在一个实施例中,三通道分别乘以这个比值,所获取到的结果中最大值大于255,则强制将该通道上的像素值设置为255,并且计算得到255与上述最大值的比值,其他两通道In one embodiment, the three channels are multiplied by this ratio, and the maximum value in the obtained result is greater than 255, then the pixel value on the channel is forced to be set to 255, and the ratio of 255 to the above-mentioned maximum value is calculated. two channel
的结果乘以此比值得到高光像素点的颜色通道对应的通道颜色比值。Multiply the result of this ratio to get the channel color ratio corresponding to the color channel of the highlight pixel.
本实施例中,通过设置预设阈值筛选出高光像素点,并通过高光像素点对应的像素提升比值与相应的系数之间的函数关系,能够达到获取高光像素点的颜色通道对应的通道颜色比值的目的。In this embodiment, the highlight pixels are selected by setting a preset threshold, and the channel color ratio corresponding to the color channel of the highlight pixel can be obtained through the functional relationship between the pixel boost ratio corresponding to the highlight pixel and the corresponding coefficient. the goal of.
在一个实施例中,如图7所示,步骤对待处理的图像进行图像处理,得到处理图像包括:In one embodiment, as shown in FIG. 7 , the steps of performing image processing on the image to be processed to obtain the processed image include:
步骤702,对待处理的图像进行图像处理,得到中间图像。Step 702: Perform image processing on the image to be processed to obtain an intermediate image.
其中,中间图像是指对待处理的图像进行处理,但是还未获得用户需要的处理图像之前的图像。The intermediate image refers to an image before the image to be processed is processed, but the processed image required by the user has not been obtained.
具体的,中间图像可以为融合图像,融合图像为对待处理的图像进行融合处理后得到的图像。Specifically, the intermediate image may be a fused image, and the fused image is an image obtained by performing fusion processing on the images to be processed.
步骤704,获取待处理的图像对应的灰度图像中像素值小于预设阈值的第一像素点,将中间图像中第一像素点对应的像素点作为第二像素点。Step 704: Obtain a first pixel whose pixel value is less than a preset threshold in the grayscale image corresponding to the image to be processed, and use the pixel corresponding to the first pixel in the intermediate image as the second pixel.
具体的,终端可以通过像素值获取工具获取到待处理的图像对应的灰度图像中像素值,通过将获取到的像素值与本端存储的预设阈值做比较,获取到小于预设阈值的第一像素点,并将中间图像中第一像素点对应的像素点作为第二像素点。Specifically, the terminal can obtain the pixel value in the grayscale image corresponding to the image to be processed through the pixel value obtaining tool, and obtain the pixel value smaller than the preset threshold by comparing the obtained pixel value with the preset threshold value stored at the local end. The first pixel point, and the pixel point corresponding to the first pixel point in the intermediate image is used as the second pixel point.
在一个实施例中,像素点预设阈值可以为64,终端获取到灰度图像中像素值小于64的像素点作为第一像素点,同时获取到与第一像素点对应的中间图像中的第二像素点。In one embodiment, the preset threshold value of a pixel point may be 64, and the terminal acquires a pixel point whose pixel value is less than 64 in the grayscale image as the first pixel point, and simultaneously acquires the first pixel point in the intermediate image corresponding to the first pixel point. two pixels.
步骤706,根据灰度图像中第一像素点的像素值得到对应的第二像素点的噪声抑制权重,像素值与噪声抑制权重成相关关系。Step 706: Obtain the noise suppression weight of the corresponding second pixel point according to the pixel value of the first pixel point in the grayscale image, and the pixel value and the noise suppression weight have a correlation.
具体的,第二像素点的噪声抑制权重可以表示为w,灰度图像中的第一像素点的像素值可表示为I 1,β为预设阈值,则第二像素点的噪声抑制权重w可表示为: Specifically, the noise suppression weight of the second pixel can be expressed as w, the pixel value of the first pixel in the grayscale image can be expressed as I 1 , and β is a preset threshold, then the noise suppression weight of the second pixel is w can be expressed as:
w=(I 1/β) 2*2+1.0-(I 1/β) 2,I 1<β w=(I 1 /β) 2 *2+1.0-(I 1 /β) 2 , I 1
在一个实施例中,预设阈值β取值为64,像素值小于64可以认为为暗区图像,通过预设阈值的选取,获取第二像素点的噪声抑制权重w。In one embodiment, the preset threshold β is 64, and the pixel value less than 64 can be regarded as a dark area image, and the noise suppression weight w of the second pixel is obtained by selecting the preset threshold.
步骤708,根据噪声抑制权重对中间图像中的第二像素点进行噪声抑制,得到处理图像。Step 708: Perform noise suppression on the second pixel in the intermediate image according to the noise suppression weight to obtain a processed image.
具体的,在计算得到噪声抑制权重后,通过此噪声抑制权重对灰度图像进行调节,得到处理图像。可以理解的,处理图像可以作为目标图像获取之前的中间图像。Specifically, after the noise suppression weight is obtained by calculation, the grayscale image is adjusted by the noise suppression weight to obtain the processed image. It can be understood that the processed image can be used as the target image to obtain the previous intermediate image.
在一个实施例中,可以通过噪声抑制权重对中间图像进行处理,将中间图像控制在待处理图像的两倍像素值范围内。例如,中间图像表示为I enhance,处理图像表示为I,则I可表示为: In one embodiment, the intermediate image may be processed through a noise suppression weight, and the intermediate image may be controlled within a range of twice the pixel value of the image to be processed. For example, if the intermediate image is represented as I enhance and the processed image is represented as I, then I can be represented as:
Figure PCTCN2021136086-appb-000003
Figure PCTCN2021136086-appb-000003
本实施例中,通过获取中间图像,并获取灰度图像中预设阈值以内的第一像素点以及中间图像中相应的第二像素点以及噪声抑制权重,能够达到将处理图像的像素值控制在待处理图像像素值的两倍以内,以便像素值小于预设阈值的图像能够提高亮度,使细节更加突出,防止因像素值差别过大出现颜色断层。In this embodiment, by acquiring the intermediate image, and acquiring the first pixel point within the preset threshold in the grayscale image, the corresponding second pixel point in the intermediate image, and the noise suppression weight, the pixel value of the processed image can be controlled within Within twice the pixel value of the image to be processed, so that the image with the pixel value less than the preset threshold can improve the brightness, make the details more prominent, and prevent color faults due to excessive pixel value difference.
在一个实施例中,如图8所示,步骤对待处理的图像进行图像处理,得到处理图像包括:In one embodiment, as shown in FIG. 8 , the steps of performing image processing on the image to be processed to obtain the processed image include:
步骤802,获取待处理的图像对应的灰度图像。Step 802: Obtain a grayscale image corresponding to the image to be processed.
在一个实施例中,在终端获取到待处理的图像后,将待处理的图像转换成灰度图像,转换方法包括分量法、最大值法或者加权平均值法等。In one embodiment, after the terminal acquires the to-be-processed image, the to-be-processed image is converted into a grayscale image, and the conversion method includes a component method, a maximum value method, a weighted average method, and the like.
在一个实施例中,可以使用加权平均值法将待处理的图像转换为灰度图像,将待处理的图像中RGB三通道颜色像素值按照不同权值进行加权平均,得到灰度图像。例如,灰度图像的像素值表示为I 1(i,j),待处理的图像中RGB三通道颜色像素值分别为R(i,j)、G(i,j)和B(i,j),则灰度图像的像素值I 1(i,j)可表示为: In one embodiment, a weighted average method can be used to convert the image to be processed into a grayscale image, and the pixel values of the three RGB channels in the image to be processed are weighted and averaged according to different weights to obtain a grayscale image. For example, the pixel value of a grayscale image is represented as I 1 (i,j), and the pixel values of the RGB three-channel color in the image to be processed are R(i,j), G(i,j) and B(i,j respectively ), then the pixel value I 1 (i,j) of the grayscale image can be expressed as:
I1(i,j)=0.299R(i,j)+0.578G(i,j)+0.114B(i,j)I1(i,j)=0.299R(i,j)+0.578G(i,j)+0.114B(i,j)
步骤804,对灰度图像进行亮化处理,得到亮化图像。Step 804 , performing brightening processing on the grayscale image to obtain a brightened image.
具体的,可以通过灰度图像像素值与亮化图像像素值之间的函数关系,获取到灰度图像对应的亮化图像。例如,亮化图像表示为I 2,灰度图像表示为I 1,a和b表示为自变量,则两者存在如下函数关系: Specifically, the brightened image corresponding to the grayscale image can be obtained through the functional relationship between the pixel value of the grayscale image and the pixel value of the brightened image. For example, a brightened image is represented by I 2 , a grayscale image is represented by I 1 , and a and b are represented as independent variables, and the two have the following functional relationship:
Figure PCTCN2021136086-appb-000004
Figure PCTCN2021136086-appb-000004
在一个实施例中,自变量a可以取值为2,自变量b可以取值为20,通过自变量的选取,通过上述函数关系,对灰度图像进行亮化处理后能够获得细节更多的亮化图像。In one embodiment, the independent variable a can take the value of 2, and the independent variable b can take the value of 20. Through the selection of the independent variable and the above-mentioned functional relationship, more details can be obtained after the grayscale image is brightened. Brighten the image.
步骤806,对灰度图像进行对比度增强处理,得到对比度增强图像。Step 806: Perform contrast enhancement processing on the grayscale image to obtain a contrast enhanced image.
具体的,可以通过灰度图像通过导向滤波得到低通滤波图I guide,通过低通滤波图I guide得到对比度增强的中间图像v 1Specifically, a low-pass filter map I guide can be obtained through guide filtering through a grayscale image, and an intermediate image v 1 with enhanced contrast can be obtained through the low-pass filter map I guide :
v 1=(I guide-127.5)*c+127.5 v 1 =(I guide -127.5)*c+127.5
其中的导向滤波是一种低通滤波器。The guided filter is a low-pass filter.
在一个实施例中,自变量c可以选取1.2,能够使得对比度增强的中间图像v 1保留更多的图像细节。 In one embodiment, the independent variable c can be selected as 1.2, which enables the contrast - enhanced intermediate image v1 to retain more image details.
在一个实施例中,将灰度图像与上述中间图像进行差值计算,以便于获得更多的图像细节,并且设置细节增强系数k detail,可以获得增强后并且细节突出的中间处理图像v 2,利用公式表示为: In one embodiment, the difference calculation is performed between the grayscale image and the above-mentioned intermediate image, so as to obtain more image details, and the detail enhancement coefficient k detail is set to obtain an enhanced intermediate image v 2 with prominent details, The formula is expressed as:
v 2=v 1+(I 1-v 1)*k detail v 2 =v 1 +(I 1 -v 1 )*k detail
在一个实施例中,为了得到高画质的灰度图像,细节增强系数k detail可以设置为4,在此细节增强系数的基础上,处理的图像细节更加突出,提高了图像处理的效果。 In one embodiment, in order to obtain a high-quality grayscale image, the detail enhancement coefficient k detail may be set to 4. On the basis of this detail enhancement coefficient, the processed image details are more prominent and the effect of image processing is improved.
在一个实施例中,对中间处理图像v 2设置预设上下限,上限表示为val max,下限表示为val min,用公式表示为: In one embodiment, a preset upper and lower limit is set for the intermediate processing image v 2 , the upper limit is represented as val max , and the lower limit is represented as val min , which is represented by the formula:
val max=I 1*k detail val max =I 1 *k detail
val min=I 1*k detail-(k detail-1) val min =I 1 *k detail -(k detail -1)
得到对比度增强图像I3:Get the contrast-enhanced image I3:
Figure PCTCN2021136086-appb-000005
Figure PCTCN2021136086-appb-000005
步骤808,对灰度图像、亮化图像和对比度增强图像进行融合处理,得到处理图像。Step 808: Perform fusion processing on the grayscale image, the brightened image, and the contrast-enhanced image to obtain a processed image.
在一个实施例中,可以对灰度图像、亮化图像和对比度增强图像进行加权融合得到处理图像。将灰度图像表示为I 1,亮化图像表示为I 2和对比度增强图像表示为I 3,I 1、I 2和I 3对应的权重图可以使用如下公式表示: In one embodiment, the processed image may be obtained by weighted fusion of the grayscale image, the brightened image, and the contrast-enhanced image. Denote the grayscale image as I 1 , the brightened image as I 2 and the contrast-enhanced image as I 3 , the corresponding weight map of I 1 , I 2 and I 3 can be expressed by the following formula:
Figure PCTCN2021136086-appb-000006
Figure PCTCN2021136086-appb-000006
在一个实施例中,灰度图像I 1、亮化图像I 2和对比度增强图像I 3对应的权重图分别设置为w 1、w 2和w 3In one embodiment, the weight maps corresponding to the grayscale image I 1 , the brightened image I 2 and the contrast-enhanced image I 3 are set as w 1 , w 2 and w 3 , respectively,
Figure PCTCN2021136086-appb-000007
Figure PCTCN2021136086-appb-000007
通过w 1、w 2和w 3中参数
Figure PCTCN2021136086-appb-000008
和参数δ的设置,可以使I 1、I 2和I 3对应的权重图中每个像素点的值更接近于每个图像的像素均值。
By the parameters in w 1 , w 2 and w 3
Figure PCTCN2021136086-appb-000008
And the setting of parameter δ can make the value of each pixel in the weight map corresponding to I 1 , I 2 and I 3 closer to the pixel mean of each image.
对上述三个权重图相同位置进行归一化处理,将权重转换成0到1之间的小数。具体 为,位置对应的三个权重加起来,每个权重更改为当前权重值除以权重和;例如,权重w1、w2和w3的权重为{3.52.54},则归一化之后转换为{0.350.250.4}。将转换后的权重作为新的权重设置在相应位置,构成权重图。将权重图和灰度图像、亮化图像和对比度增强图像进行多尺度融合或多分辨率融合得到处理图像。可以理解的,此时的处理图像可以是作为中间图像的融合图像。Normalize the same position of the above three weight maps, and convert the weights into decimals between 0 and 1. Specifically, the three weights corresponding to the position are added up, and each weight is changed to the current weight value divided by the weight sum; for example, the weights of the weights w1, w2 and w3 are {3.52.54}, then normalized and converted to { 0.350.250.4}. The transformed weights are set as new weights at the corresponding positions to form a weight map. Multi-scale fusion or multi-resolution fusion of weight map and grayscale image, brightened image and contrast-enhanced image is performed to obtain the processed image. It can be understood that the processed image at this time may be a fused image serving as an intermediate image.
本实施例中,通过将图像分别转换为灰度图像、亮化图像和对比度增强图像进行融合处理,并对图像加权融合,能够达到获得融合图像的目的。In this embodiment, the purpose of obtaining a fused image can be achieved by converting the image into a grayscale image, a brightened image, and a contrast-enhanced image, respectively, for fusion processing, and weighted fusion of the images.
在一个实施例中,上述实施例中得到的融合图像可以作为步骤202中的处理图像,将上述融合图像经图7中步骤702-步骤708中的噪声抑制处理之后,也可以作为步骤202中的处理图像。In one embodiment, the fused image obtained in the above embodiment can be used as the processed image in step 202 , and the above fused image can also be used as the processed image in step 202 after the noise suppression processing in steps 702 to 708 in FIG. 7 . Process images.
应该理解的是,虽然图1-8的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图1-8中的至少一部分步骤可以包括多个步骤或者多个阶段,这些步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤中的步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the steps in the flowcharts of FIGS. 1-8 are shown in sequence according to the arrows, these steps are not necessarily executed in the sequence shown by the arrows. Unless explicitly stated herein, the execution of these steps is not strictly limited to the order, and these steps may be performed in other orders. Moreover, at least a part of the steps in FIGS. 1-8 may include multiple steps or multiple stages. These steps or stages are not necessarily executed and completed at the same time, but may be executed at different times. The execution of these steps or stages The order is also not necessarily sequential, but may be performed alternately or alternately with other steps or at least a portion of the steps or phases within the other steps.
在一个实施例中,如图9所示,提供了一种图像处理装置900,包括:处理图像获取模块902、通道统计值获取模块904、通道颜色比值获取模块906、颜色抑制比值获取模块908和目标图像获取模块910,其中:In one embodiment, as shown in FIG. 9, an image processing apparatus 900 is provided, including: a processed image acquisition module 902, a channel statistical value acquisition module 904, a channel color ratio acquisition module 906, a color suppression ratio acquisition module 908 and Target image acquisition module 910, wherein:
处理图像获取模块902,用于对待处理的图像进行图像处理,得到处理图像;A processed image acquisition module 902, configured to perform image processing on the image to be processed to obtain a processed image;
通道统计值获取模块904,用于获取处理图像中各个像素点对应的颜色通道值,对颜色通道值进行统计,得到处理图像对应的通道统计;A channel statistical value acquisition module 904, configured to acquire color channel values corresponding to each pixel in the processed image, perform statistics on the color channel values, and obtain channel statistics corresponding to the processed image;
通道颜色比值获取模块906,用于获取处理图像中的饱和度提升像素点,基于饱和度提升像素点的各个颜色通道值与通道统计值计算,得到饱和度提升像素点的各个颜色通道对应的通道颜色比值;The channel color ratio acquisition module 906 is used to acquire the saturation enhancement pixels in the processed image, and calculate the channel corresponding to each color channel of the saturation enhancement pixels based on the calculation of each color channel value and the channel statistical value of the saturation enhancement pixels. color ratio;
颜色抑制比值获取模块908,用于从饱和度提升像素点的各个颜色通道对应的通道颜色比值中选取最小值,作为饱和度提升像素点的各个颜色通道对应的颜色抑制比值;The color suppression ratio acquisition module 908 is used to select the minimum value from the channel color ratios corresponding to each color channel of the saturation boosting pixel as the color suppression ratio corresponding to each color channel of the saturation boosting pixel;
目标图像获取模块910,用于基于饱和度提升像素点的各个颜色通道对应的颜色抑制比值对饱和度提升像素点的各个颜色通道进行颜色抑制处理,得到目标图像。The target image acquisition module 910 is configured to perform color suppression processing on each color channel of the saturation boosted pixel based on the color suppression ratio corresponding to each color channel of the saturation boosted pixel to obtain a target image.
在一个实施例中,通道颜色比值获取模块906还用于获取待处理的图像对应的灰度图像;In one embodiment, the channel color ratio obtaining module 906 is further configured to obtain a grayscale image corresponding to the image to be processed;
根据处理图像中各个像素点的像素值以及灰度图像中相应位置像素点的像素值,确定处理图像中各个像素点相对于灰度图像的像素提升比值;According to the pixel value of each pixel in the processed image and the pixel value of the pixel at the corresponding position in the grayscale image, determine the pixel enhancement ratio of each pixel in the processed image relative to the grayscale image;
将处理图像中像素提升比值大于预设阈值的像素点作为饱和度提升像素点。The pixels whose pixel enhancement ratio is greater than the preset threshold in the processed image are regarded as saturation enhancement pixels.
在一个实施例中,通道颜色比值获取模块906还用于计算饱和度提升像素点的各个颜色通道值相对于通道统计值的变化值;In one embodiment, the channel color ratio acquisition module 906 is further configured to calculate the change value of each color channel value of the saturation boosting pixel point relative to the channel statistical value;
根据变化值确定饱和度提升像素点的各个颜色通道值对应的调节权重,颜色通道值调节权重与变化值成负相关关系;Determine the adjustment weight corresponding to each color channel value of the saturation enhancement pixel according to the change value, and the adjustment weight of the color channel value has a negative correlation with the change value;
根据饱和度提升像素点的各个颜色通道值对应的调节权重,计算得到饱和度提升像素点的各个颜色通道对应的通道颜色比值According to the adjustment weights corresponding to the value of each color channel of the saturation boosting pixel, the channel color ratio corresponding to each color channel of the saturation boosting pixel is calculated.
在一个实施例中,通道颜色比值获取模块906还用于根据饱和度提升像素点的各个颜色通道值对应的调节权重以及饱和度提升像素点的像素提升比值的乘积,计算得到第一比值;In one embodiment, the channel color ratio obtaining module 906 is further configured to calculate the first ratio according to the product of the adjustment weight corresponding to each color channel value of the saturation boosting pixel and the pixel boosting ratio of the saturation boosting pixel;
利用预设值减去饱和度提升像素点的各个颜色通道值对应的调节权重,得到第二比值;The second ratio is obtained by subtracting the adjustment weight corresponding to each color channel value of the saturation boosting pixel from the preset value;
将第一比值与第二比值相加,得到饱和度提升像素点的各个颜色通道对应的通道颜色比值。The first ratio and the second ratio are added to obtain the channel color ratio corresponding to each color channel of the pixel point with increased saturation.
在一个实施例中,图像处理装置还包括:高光像素点获取模块、第三比值获取模块、第四比值获取模块和通道颜色比值获取模块,其中:In one embodiment, the image processing apparatus further includes: a highlight pixel point acquisition module, a third ratio acquisition module, a fourth ratio acquisition module, and a channel color ratio acquisition module, wherein:
高光像素点获取模块,用于获取灰度图像中像素值大于预设阈值的像素点,作为高光像素点;The highlight pixel point acquisition module is used to acquire the pixel points whose pixel value is greater than the preset threshold in the grayscale image, as the highlight pixel point;
第三比值获取模块,用于将高光像素点对应的像素提升比值与第一系数进行相乘,得到第三比值;第一系数与处理图像中,高光像素点相应位置像素点的像素值成负相关关系;The third ratio acquisition module is used to multiply the pixel boost ratio corresponding to the highlight pixel by the first coefficient to obtain a third ratio; the first coefficient and the pixel value of the pixel corresponding to the highlight pixel in the processed image are negative relationship;
第四比值获取模块,用于利用预设值减去第一系数,得到第四比值;a fourth ratio obtaining module, used for subtracting the first coefficient from the preset value to obtain the fourth ratio;
通道颜色比值获取模块,用于将第三比值与第四比值相加,得到高光像素点的各个颜色通道对应的通道颜色比值。The channel color ratio acquisition module is used for adding the third ratio and the fourth ratio to obtain the channel color ratio corresponding to each color channel of the highlight pixel.
在一个实施例中,处理图像获取模块还用于:In one embodiment, the processing image acquisition module is further used to:
对待处理的图像进行图像处理,得到中间图像;Perform image processing on the image to be processed to obtain an intermediate image;
获取待处理的图像对应的灰度图像中像素值小于预设阈值的第一像素点,将中间图像中第一像素点对应的像素点作为第二像素点;Obtain the first pixel point in the grayscale image corresponding to the image to be processed whose pixel value is less than the preset threshold, and use the pixel point corresponding to the first pixel point in the intermediate image as the second pixel point;
根据灰度图像中第一像素点的像素值得到对应的第二像素点的噪声抑制权重,像素值与噪声抑制权重成相关关系;The noise suppression weight of the corresponding second pixel point is obtained according to the pixel value of the first pixel point in the grayscale image, and the pixel value and the noise suppression weight have a correlation;
根据噪声抑制权重对中间图像中的第二像素点进行噪声抑制,得到处理图像。Noise suppression is performed on the second pixel in the intermediate image according to the noise suppression weight to obtain a processed image.
在一个实施例中,处理图像获取模块还用于:In one embodiment, the processing image acquisition module is further used to:
获取待处理的图像对应的灰度图像;Obtain the grayscale image corresponding to the image to be processed;
对灰度图像进行亮化处理,得到亮化图像;Brighten the grayscale image to obtain a brightened image;
对灰度图像进行对比度增强处理,得到对比度增强图像;Perform contrast enhancement processing on the grayscale image to obtain a contrast enhanced image;
对灰度图像、亮化图像和对比度增强图像进行融合处理,得到处理图像。The grayscale image, the brightened image and the contrast-enhanced image are fused to obtain the processed image.
关于图像处理装置的具体限定可以参见上文中对于图像处理方法的限定,在此不再赘述。上述图像处理装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For the specific limitation of the image processing apparatus, reference may be made to the limitation of the image processing method above, which will not be repeated here. Each module in the above-mentioned image processing apparatus may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
在一个实施例中,提供了一种计算机设备,该计算机设备可以是终端,其内部结构图可以如图10所示。该计算机设备包括通过系统总线连接的处理器、存储器、通信接口、显示屏和输入装置。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统和计算机程序。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的通信接口用于与外部的终端进行有线或无线方式的通信,无线方式可通过WIFI、运营商网络、NFC(近场通信)或其他技术实现。该计算机程序被处理器执行时以实现一种图像处理方法。该计算机设备的显示屏可以是液晶显示屏或者电子墨水显示屏,该计算机设备的输入装置可以是显示屏上覆盖的触摸层,也可以是计算机设备外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等。In one embodiment, a computer device is provided, and the computer device may be a terminal, and its internal structure diagram may be as shown in FIG. 10 . The computer equipment includes a processor, memory, a communication interface, a display screen, and an input device connected by a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium, an internal memory. The nonvolatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the execution of the operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for wired or wireless communication with an external terminal, and the wireless communication can be realized by WIFI, operator network, NFC (Near Field Communication) or other technologies. The computer program implements an image processing method when executed by a processor. The display screen of the computer equipment may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment may be a touch layer covered on the display screen, or a button, a trackball or a touchpad set on the shell of the computer equipment , or an external keyboard, trackpad, or mouse.
本领域技术人员可以理解,图10中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in FIG. 10 is only a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied. Include more or fewer components than shown in the figures, or combine certain components, or have a different arrangement of components.
在一个实施例中,提供了一种计算机设备,包括存储器和处理器,存储器中存储有计算机程序,该处理器执行计算机程序时实现以下步骤:In one embodiment, a computer device is provided, including a memory and a processor, a computer program is stored in the memory, and the processor implements the following steps when executing the computer program:
对待处理的图像进行图像处理,得到处理图像;Perform image processing on the image to be processed to obtain a processed image;
获取处理图像中,各个像素点对应的颜色通道值,对颜色通道值进行统计,得到处理图像对应的通道统计值;Obtain the color channel value corresponding to each pixel in the processed image, and perform statistics on the color channel value to obtain the channel statistical value corresponding to the processed image;
获取处理图像中的饱和度提升像素点,基于饱和度提升像素点的各个颜色通道值与通道统计值,计算得到饱和度提升像素点的各个颜色通道对应的通道颜色比值;Acquire the saturation enhancement pixel points in the processed image, and calculate the channel color ratio corresponding to each color channel of the saturation enhancement pixel point based on the value of each color channel and the channel statistics value of the saturation enhancement pixel point;
从饱和度提升像素点的各个颜色通道对应的通道颜色比值中选取最小值,作为饱和度提升像素点的各个颜色通道对应的颜色抑制比值;Select the minimum value from the channel color ratios corresponding to each color channel of the saturation boosting pixel as the color suppression ratio corresponding to each color channel of the saturation boosting pixel;
基于饱和度提升像素点的各个颜色通道对应的颜色抑制比值对饱和度提升像素点的各个颜色通道进行颜色抑制处理,得到目标图像。Color suppression processing is performed on each color channel of the saturation boosted pixel based on the color suppression ratio corresponding to each color channel of the saturation boosted pixel to obtain a target image.
在一个实施例中,处理器执行计算机程序时还实现以下步骤:In one embodiment, the processor further implements the following steps when executing the computer program:
获取待处理的图像对应的灰度图像;Obtain the grayscale image corresponding to the image to be processed;
根据处理图像中各个像素点的像素值以及灰度图像中相应位置像素点的像素值,确定处理图像中各个像素点相对于灰度图像的像素提升比值;According to the pixel value of each pixel in the processed image and the pixel value of the pixel at the corresponding position in the grayscale image, determine the pixel enhancement ratio of each pixel in the processed image relative to the grayscale image;
将处理图像中像素提升比值大于预设阈值的像素点作为饱和度提升像素点。The pixels whose pixel enhancement ratio is greater than the preset threshold in the processed image are regarded as saturation enhancement pixels.
在一个实施例中,处理器执行计算机程序时还实现以下步骤:In one embodiment, the processor further implements the following steps when executing the computer program:
计算饱和度提升像素点的各个颜色通道值相对于通道统计值的变化值;Calculate the change value of each color channel value of the saturation boosting pixel relative to the channel statistical value;
根据变化值确定饱和度提升像素点的各个颜色通道值对应的调节权重,颜色通道值调节权重与变化值成负相关关系;Determine the adjustment weight corresponding to each color channel value of the saturation enhancement pixel according to the change value, and the adjustment weight of the color channel value has a negative correlation with the change value;
根据饱和度提升像素点的各个颜色通道值对应的调节权重,计算得到饱和度提升像素点的各个颜色通道对应的通道颜色比值。According to the adjustment weight corresponding to each color channel value of the saturation boosting pixel, the channel color ratio corresponding to each color channel of the saturation boosting pixel is calculated.
在一个实施例中,处理器执行计算机程序时还实现以下步骤:In one embodiment, the processor further implements the following steps when executing the computer program:
根据饱和度提升像素点对应的调节权重以及饱和度提升像素点的提升比值的乘积计算得到第一比值;The first ratio is calculated according to the product of the adjustment weight corresponding to the saturation boosting pixel and the boosting ratio of the saturation boosting pixel;
利用预设值减去饱和度提升像素点的各个颜色通道值对应的调节权重,得到第二比值;The second ratio is obtained by subtracting the adjustment weight corresponding to each color channel value of the saturation boosting pixel from the preset value;
将第一比值与第二比值相加,得到饱和度提升像素点的各个颜色通道对应的通道颜色比值。The first ratio and the second ratio are added to obtain the channel color ratio corresponding to each color channel of the pixel point with increased saturation.
在一个实施例中,处理器执行计算机程序时还实现以下步骤:In one embodiment, the processor further implements the following steps when executing the computer program:
获取灰度图像中像素值大于预设阈值的像素点,作为高光像素点;Acquire the pixels whose pixel values are greater than the preset threshold in the grayscale image as highlight pixels;
将高光像素点对应的像素提升比值与第一系数进行相乘,得到第三比值;第一系数与处理图像中,高光像素点相应位置像素点的像素值成负相关关系;The pixel boost ratio corresponding to the highlight pixel is multiplied by the first coefficient to obtain a third ratio; the first coefficient has a negative correlation with the pixel value of the pixel at the corresponding position of the highlight pixel in the processed image;
利用预设值减去第一系数,得到第四比值;Use the preset value to subtract the first coefficient to obtain the fourth ratio;
将第三比值与第四比值相加,得到高光像素点的各个颜色通道对应的通道颜色比值。The third ratio and the fourth ratio are added to obtain the channel color ratio corresponding to each color channel of the highlight pixel point.
在一个实施例中,处理器执行计算机程序时还实现以下步骤:In one embodiment, the processor further implements the following steps when executing the computer program:
对待处理的图像进行图像处理,得到中间图像;Perform image processing on the image to be processed to obtain an intermediate image;
获取待处理的图像对应的灰度图像中像素值小于预设阈值的第一像素点,将中间图像中第一像素点对应的像素点作为第二像素点;Obtain the first pixel point in the grayscale image corresponding to the image to be processed whose pixel value is less than the preset threshold, and use the pixel point corresponding to the first pixel point in the intermediate image as the second pixel point;
根据灰度图像中第一像素点的像素值得到对应的第二像素点的噪声抑制权重,像素值与噪声抑制权重成相关关系;The noise suppression weight of the corresponding second pixel point is obtained according to the pixel value of the first pixel point in the grayscale image, and the pixel value and the noise suppression weight have a correlation;
根据噪声抑制权重对中间图像中的第二像素点进行噪声抑制,得到处理图像。Noise suppression is performed on the second pixel in the intermediate image according to the noise suppression weight to obtain a processed image.
在一个实施例中,处理器执行计算机程序时还实现以下步骤:In one embodiment, the processor further implements the following steps when executing the computer program:
获取待处理的图像对应的灰度图像;Obtain the grayscale image corresponding to the image to be processed;
对灰度图像进行亮化处理,得到亮化图像;Brighten the grayscale image to obtain a brightened image;
对灰度图像进行对比度增强处理,得到对比度增强图像;Perform contrast enhancement processing on the grayscale image to obtain a contrast enhanced image;
对灰度图像、亮化图像和对比度增强图像进行融合处理,得到处理图像。The grayscale image, the brightened image and the contrast-enhanced image are fused to obtain the processed image.
在一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现以下步骤:In one embodiment, a computer-readable storage medium is provided on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
对待处理的图像进行图像处理,得到处理图像;Perform image processing on the image to be processed to obtain a processed image;
获取处理图像中,各个像素点对应的颜色通道值,对颜色通道值进行统计,得到处理图像对应的通道统计值;Obtain the color channel value corresponding to each pixel in the processed image, and perform statistics on the color channel value to obtain the channel statistical value corresponding to the processed image;
获取处理图像中的饱和度提升像素点,基于饱和度提升像素点的各个颜色通道值与通道统计值,计算得到饱和度提升像素点的各个颜色通道对应的通道颜色比值;Acquire the saturation enhancement pixel points in the processed image, and calculate the channel color ratio corresponding to each color channel of the saturation enhancement pixel point based on the value of each color channel and the channel statistics value of the saturation enhancement pixel point;
从饱和度提升像素点的各个颜色通道对应的通道颜色比值中选取最小值,作为饱和度提升像素点的各个颜色通道对应的颜色抑制比值;Select the minimum value from the channel color ratios corresponding to each color channel of the saturation boosting pixel as the color suppression ratio corresponding to each color channel of the saturation boosting pixel;
基于饱和度提升像素点的各个颜色通道对应的颜色抑制比值对饱和度提升像素点的各个颜色通道进行颜色抑制处理,得到目标图像。Color suppression processing is performed on each color channel of the saturation boosted pixel based on the color suppression ratio corresponding to each color channel of the saturation boosted pixel to obtain a target image.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:In one embodiment, the computer program further implements the following steps when executed by the processor:
获取待处理的图像对应的灰度图像;Obtain the grayscale image corresponding to the image to be processed;
根据处理图像中各个像素点的像素值以及灰度图像中相应位置像素点的像素值,确定处理图像中各个像素点相对于灰度图像的像素提升比值;According to the pixel value of each pixel in the processed image and the pixel value of the pixel at the corresponding position in the grayscale image, determine the pixel enhancement ratio of each pixel in the processed image relative to the grayscale image;
将处理图像中像素提升比值大于预设阈值的像素点作为饱和度提升像素点。The pixels whose pixel enhancement ratio is greater than the preset threshold in the processed image are regarded as saturation enhancement pixels.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:In one embodiment, the computer program further implements the following steps when executed by the processor:
计算饱和度提升像素点的各个颜色通道值相对于通道统计值的变化值;Calculate the change value of each color channel value of the saturation boosting pixel relative to the channel statistical value;
根据变化值确定饱和度提升像素点的各个颜色通道值对应的调节权重,颜色通道值调节权重与变化值成负相关关系;Determine the adjustment weight corresponding to each color channel value of the saturation enhancement pixel according to the change value, and the adjustment weight of the color channel value has a negative correlation with the change value;
根据饱和度提升像素点的各个颜色通道值对应的调节权重,计算得到饱和度提升像素点的各个颜色通道对应的通道颜色比值。According to the adjustment weight corresponding to each color channel value of the saturation boosting pixel, the channel color ratio corresponding to each color channel of the saturation boosting pixel is calculated.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:In one embodiment, the computer program further implements the following steps when executed by the processor:
根据饱和度提升像素点的各个颜色通道值对应的调节权重以及饱和度提升像素点的像素提升比值的乘积计算得到第一比值;The first ratio is calculated according to the product of the adjustment weight corresponding to each color channel value of the saturation boosting pixel and the pixel boosting ratio of the saturation boosting pixel;
利用预设值减去饱和度提升像素点的各个颜色通道值对应的调节权重,得到第二比值;The second ratio is obtained by subtracting the adjustment weight corresponding to each color channel value of the saturation boosting pixel from the preset value;
将第一比值与第二比值相加,得到饱和度提升像素点的各个颜色通道对应的通道颜色比值。The first ratio and the second ratio are added to obtain the channel color ratio corresponding to each color channel of the pixel point with increased saturation.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:In one embodiment, the computer program further implements the following steps when executed by the processor:
获取灰度图像中像素值大于预设阈值的像素点,作为高光像素点;Acquire the pixels whose pixel values are greater than the preset threshold in the grayscale image as highlight pixels;
将高光像素点对应的像素提升比值与第一系数进行相乘,得到第三比值;第一系数与处理图像中,高光像素点相应位置像素点的像素值成负相关关系;Multiply the pixel boost ratio corresponding to the highlight pixel point with the first coefficient to obtain a third ratio; the first coefficient is in a negative correlation with the pixel value of the pixel point corresponding to the highlight pixel point in the processed image;
利用预设值减去第一系数,得到第四比值;Use the preset value to subtract the first coefficient to obtain the fourth ratio;
将第三比值与第四比值相加,得到高光像素点的各个颜色通道对应的通道颜色比值。The third ratio and the fourth ratio are added to obtain the channel color ratio corresponding to each color channel of the highlight pixel point.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:In one embodiment, the computer program further implements the following steps when executed by the processor:
对待处理的图像进行图像处理,得到中间图像;Perform image processing on the image to be processed to obtain an intermediate image;
获取待处理的图像对应的灰度图像中像素值小于预设阈值的第一像素点,将中间图像中第一像素点对应的像素点作为第二像素点;Obtain the first pixel point in the grayscale image corresponding to the image to be processed whose pixel value is less than the preset threshold, and use the pixel point corresponding to the first pixel point in the intermediate image as the second pixel point;
根据灰度图像中第一像素点的像素值得到对应的第二像素点的噪声抑制权重,像素值与噪声抑制权重成相关关系;The noise suppression weight of the corresponding second pixel point is obtained according to the pixel value of the first pixel point in the grayscale image, and the pixel value and the noise suppression weight have a correlation;
根据噪声抑制权重对中间图像中的第二像素点进行噪声抑制,得到处理图像。Noise suppression is performed on the second pixel in the intermediate image according to the noise suppression weight to obtain a processed image.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:In one embodiment, the computer program further implements the following steps when executed by the processor:
获取待处理的图像对应的灰度图像;Obtain the grayscale image corresponding to the image to be processed;
对灰度图像进行亮化处理,得到亮化图像;Brighten the grayscale image to obtain a brightened image;
对灰度图像进行对比度增强处理,得到对比度增强图像;Perform contrast enhancement processing on the grayscale image to obtain a contrast enhanced image;
对灰度图像、亮化图像和对比度增强图像进行融合处理,得到处理图像。The grayscale image, the brightened image and the contrast-enhanced image are fused to obtain the processed image.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和易失性存储器中的至少一种。非易失性存储器可包括只读存储器(Read-Only Memory,ROM)、磁带、软盘、闪存或光存储器等。易失性存储器可包括随机存取存储器(RandomAccess Memory,RAM)或外部高速缓冲存储器。作为说明而非局限,RAM可以是多种形式,比如静态随机存取存储器(Static RandomAccess Memory,SRAM)或动态随机存取存储器(Dynamic RandomAccess Memory,DRAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium , when the computer program is executed, it may include the processes of the above-mentioned method embodiments. Wherein, any reference to memory, storage, database or other media used in the various embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, or optical memory, and the like. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (Static RandomAccess Memory, SRAM) or dynamic random access memory (Dynamic RandomAccess Memory, DRAM).
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的 各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, all It is considered to be the range described in this specification.
以上实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above examples only represent several embodiments of the present application, and the descriptions thereof are relatively specific and detailed, but should not be construed as a limitation on the scope of the invention patent. It should be pointed out that for those skilled in the art, without departing from the concept of the present application, several modifications and improvements can be made, which all belong to the protection scope of the present application. Therefore, the scope of protection of the patent of the present application shall be subject to the appended claims.

Claims (10)

  1. 一种图像处理方法,其特征在于,所述方法包括:An image processing method, characterized in that the method comprises:
    对待处理的图像进行图像处理,得到处理图像;Perform image processing on the image to be processed to obtain a processed image;
    获取所述处理图像中各个像素点对应的颜色通道值,对所述颜色通道值进行统计,得到所述处理图像对应的通道统计值;Acquire the color channel value corresponding to each pixel in the processed image, perform statistics on the color channel value, and obtain the channel statistical value corresponding to the processed image;
    获取所述处理图像中的饱和度提升像素点,基于所述饱和度提升像素点的各个颜色通道值与所述通道统计值,计算得到饱和度提升像素点的各个颜色通道对应的通道颜色比值;Acquire the saturation enhancement pixel points in the processed image, and calculate the channel color ratio corresponding to each color channel of the saturation enhancement pixel point based on the value of each color channel of the saturation enhancement pixel point and the channel statistical value;
    从所述饱和度提升像素点的各个颜色通道对应的通道颜色比值中选取最小值,作为所述饱和度提升像素点的各个颜色通道对应的颜色抑制比值;The minimum value is selected from the channel color ratios corresponding to each color channel of the saturation boosting pixel as the color suppression ratio corresponding to each color channel of the saturation boosting pixel;
    基于所述饱和度提升像素点的各个颜色通道对应的颜色抑制比值,对所述饱和度提升像素点的各个颜色通道进行颜色抑制处理,得到目标图像。Based on the color suppression ratios corresponding to the respective color channels of the saturation-enhanced pixels, color suppression processing is performed on the respective color channels of the saturation-enhanced pixels to obtain a target image.
  2. 根据权利要求1所述的方法,其特征在于,所述获取所述处理图像中的饱和度提升像素点包括:The method according to claim 1, wherein the acquiring the saturation-enhanced pixel points in the processed image comprises:
    获取所述待处理的图像对应的灰度图像;obtaining a grayscale image corresponding to the image to be processed;
    根据所述处理图像中各个像素点的像素值以及所述灰度图像中相应位置像素点的像素值,确定所述处理图像中各个像素点相对于所述灰度图像的像素提升比值;According to the pixel value of each pixel in the processed image and the pixel value of the pixel at the corresponding position in the grayscale image, determine the pixel boost ratio of each pixel in the processed image relative to the grayscale image;
    将所述处理图像中像素提升比值大于预设阈值的像素点作为饱和度提升像素点。Pixels whose pixel enhancement ratio is greater than a preset threshold in the processed image are used as saturation enhancement pixels.
  3. 根据权利要求2所述的方法,其特征在于,所述基于所述饱和度提升像素点的各个颜色通道值与所述通道统计值,计算得到饱和度提升像素点的各个颜色通道对应的通道颜色比值包括:The method according to claim 2, wherein the channel color corresponding to each color channel of the saturation-enhanced pixel is calculated based on the value of each color channel of the saturation-enhanced pixel and the channel statistical value Ratios include:
    计算所述饱和度提升像素点的各个颜色通道值相对于所述通道统计值的变化值;Calculate the change value of each color channel value of the saturation boosting pixel point relative to the channel statistical value;
    根据所述变化值确定所述饱和度提升像素点的各个颜色通道值对应的调节权重,所述颜色通道值调节权重与所述变化值成负相关关系;Determine the adjustment weight corresponding to each color channel value of the saturation boosting pixel point according to the change value, and the color channel value adjustment weight has a negative correlation with the change value;
    根据所述饱和度提升像素点的各个颜色通道值对应的调节权重,计算得到所述饱和度提升像素点的各个颜色通道对应的通道颜色比值。According to the adjustment weights corresponding to the respective color channel values of the saturation boosting pixels, the channel color ratios corresponding to the respective color channels of the saturation boosting pixels are calculated and obtained.
  4. 根据权利要求3所述的方法,其特征在于,所述根据所述饱和度提升像素点的各个颜色通道值对应的调节权重,计算得到所述饱和度提升像素点的各个颜色通道对应的通道颜色比值包括:The method according to claim 3, wherein, according to the adjustment weight corresponding to each color channel value of the saturation boosting pixel, the channel color corresponding to each color channel of the saturation boosting pixel is calculated and obtained Ratios include:
    根据所述饱和度提升像素点的各个颜色通道值对应的调节权重以及所述饱和度提升像素点的像素提升比值的乘积,计算得到第一比值;Calculate the first ratio according to the product of the adjustment weight corresponding to each color channel value of the saturation boosting pixel and the pixel boosting ratio of the saturation boosting pixel;
    利用预设值减去所述饱和度提升像素点的各个颜色通道值对应的调节权重,得到第二比值;The second ratio is obtained by subtracting the adjustment weight corresponding to each color channel value of the saturation boosting pixel from the preset value;
    将所述第一比值与所述第二比值相加,得到饱和度提升像素点的各个颜色通道对应的通道颜色比值。The first ratio and the second ratio are added to obtain the channel color ratio corresponding to each color channel of the pixel point with increased saturation.
  5. 根据权利要求2所述的方法,其特征在于,所述方法还包括:The method according to claim 2, wherein the method further comprises:
    获取所述灰度图像中像素值大于预设阈值的像素点,作为高光像素点;Acquiring pixels whose pixel values are greater than a preset threshold in the grayscale image as highlight pixels;
    将所述高光像素点对应的像素提升比值与第一系数进行相乘,得到第三比值;所述第一系数与所述处理图像中,所述高光像素点相应位置像素点的像素值成负相关关系;Multiply the pixel boost ratio corresponding to the highlight pixel point by the first coefficient to obtain a third ratio; the first coefficient and the pixel value of the pixel point corresponding to the highlight pixel point in the processed image are negative relationship;
    利用预设值减去所述第一系数,得到第四比值;Subtract the first coefficient from the preset value to obtain a fourth ratio;
    将所述第三比值与所述第四比值相加,得到所述高光像素点的各个颜色通道对应的通道颜色比值。The third ratio and the fourth ratio are added to obtain the channel color ratio corresponding to each color channel of the highlight pixel point.
  6. 根据权利要求1所述的方法,其特征在于,所述对待处理的图像进行图像处理,得到处理图像包括:The method according to claim 1, wherein performing image processing on the image to be processed to obtain the processed image comprises:
    对待处理的图像进行图像处理,得到中间图像;Perform image processing on the image to be processed to obtain an intermediate image;
    获取所述待处理的图像对应的灰度图像中像素值小于预设阈值的第一像素点,将所述中间图像中所述第一像素点对应的像素点作为第二像素点;acquiring the first pixel point whose pixel value is less than a preset threshold in the grayscale image corresponding to the image to be processed, and using the pixel point corresponding to the first pixel point in the intermediate image as the second pixel point;
    根据所述灰度图像中所述第一像素点的像素值得到对应的所述第二像素点的噪声抑制权重,所述像素值与所述噪声抑制权重成相关关系;Obtain the noise suppression weight of the corresponding second pixel point according to the pixel value of the first pixel point in the grayscale image, and the pixel value and the noise suppression weight have a correlation;
    根据所述噪声抑制权重对所述中间图像中的第二像素点进行噪声抑制,得到处理图像。Noise suppression is performed on the second pixel in the intermediate image according to the noise suppression weight to obtain a processed image.
  7. 根据权利要求1或6所述的方法,其特征在于,所述对待处理的图像进行图像处理,得到处理图像包括:The method according to claim 1 or 6, wherein performing image processing on the image to be processed to obtain the processed image comprises:
    获取待处理的图像对应的灰度图像;Obtain the grayscale image corresponding to the image to be processed;
    对所述灰度图像进行亮化处理,得到亮化图像;Performing a brightening process on the grayscale image to obtain a brightened image;
    对所述灰度图像进行对比度增强处理,得到对比度增强图像;performing contrast enhancement processing on the grayscale image to obtain a contrast enhancement image;
    对所述灰度图像、所述亮化图像和所述对比度增强图像进行融合处理,得到处理图像。Perform fusion processing on the grayscale image, the brightened image, and the contrast-enhanced image to obtain a processed image.
  8. 一种图像处理装置,其特征在于,所述装置包括:An image processing device, characterized in that the device comprises:
    处理图像获取模块,用于对待处理的图像进行图像处理,得到处理图像;The processing image acquisition module is used to perform image processing on the image to be processed to obtain the processed image;
    通道统计值获取模块,用于获取所述处理图像中各个像素点对应的颜色通道值,对所述颜色通道值进行统计,得到所述处理图像对应的通道统计值;A channel statistical value acquisition module, configured to acquire color channel values corresponding to each pixel in the processed image, perform statistics on the color channel values, and obtain channel statistical values corresponding to the processed image;
    通道颜色比值获取模块,用于获取所述处理图像中的饱和度提升像素点,基于所述饱和度提升像素点的各个颜色通道值与所述通道统计值,计算得到饱和度提升像素点的各个颜色通道对应的通道颜色比值;The channel color ratio acquisition module is used to acquire the saturation enhancement pixel points in the processed image, and based on each color channel value of the saturation enhancement pixel point and the channel statistical value, calculate each saturation enhancement pixel point. The channel color ratio corresponding to the color channel;
    颜色抑制比值获取模块,用于从所述饱和度提升像素点的各个颜色通道对应的通道颜色 比值中选取最小值,作为所述饱和度提升像素点的各个颜色通道对应的颜色抑制比值;The color suppression ratio acquisition module is used to select the minimum value from the channel color ratios corresponding to each color channel of the described saturation enhancement pixel, as the color suppression ratio corresponding to each color channel of the described saturation enhancement pixel;
    目标图像获取模块,用于基于所述饱和度提升像素点的各个颜色通道对应的颜色抑制比值对所述饱和度提升像素点的各个颜色通道进行颜色抑制处理,得到目标图像。A target image acquisition module, configured to perform color suppression processing on each color channel of the saturation enhancement pixel based on the color suppression ratio corresponding to each color channel of the saturation enhancement pixel to obtain a target image.
  9. 一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,其特征在于,所述处理器执行所述计算机程序时实现权利要求1至7中任一项所述的方法的步骤。A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein the processor implements the steps of the method according to any one of claims 1 to 7 when the processor executes the computer program.
  10. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至7中任一项所述的方法的步骤。A computer-readable storage medium on which a computer program is stored, characterized in that, when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
PCT/CN2021/136086 2020-12-07 2021-12-07 Image processing method and apparatus, and computer device and storage medium WO2022121893A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011418526.3 2020-12-07
CN202011418526.3A CN112541868A (en) 2020-12-07 2020-12-07 Image processing method, image processing device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2022121893A1 true WO2022121893A1 (en) 2022-06-16

Family

ID=75016303

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/136086 WO2022121893A1 (en) 2020-12-07 2021-12-07 Image processing method and apparatus, and computer device and storage medium

Country Status (2)

Country Link
CN (1) CN112541868A (en)
WO (1) WO2022121893A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115731861A (en) * 2022-11-18 2023-03-03 武汉路特斯汽车有限公司 Screen color adjusting method and device and terminal

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112541868A (en) * 2020-12-07 2021-03-23 影石创新科技股份有限公司 Image processing method, image processing device, computer equipment and storage medium
CN117237258B (en) * 2023-11-14 2024-02-09 山东捷瑞数字科技股份有限公司 Night vision image processing method, system, equipment and medium based on three-dimensional engine

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120294527A1 (en) * 2011-05-19 2012-11-22 Rastislav Lukac Method for processing highlights and saturated regions in a digital image
CN103618887A (en) * 2013-11-29 2014-03-05 深圳Tcl新技术有限公司 Method and device for processing image
CN105631826A (en) * 2015-12-25 2016-06-01 武汉鸿瑞达信息技术有限公司 Color image saturation enhancing method and system
CN108876742A (en) * 2018-06-25 2018-11-23 深圳市华星光电技术有限公司 image color enhancement method and device
CN109741279A (en) * 2019-01-04 2019-05-10 Oppo广东移动通信有限公司 Image saturation method of adjustment, device, storage medium and terminal
CN111163268A (en) * 2020-01-09 2020-05-15 腾讯科技(深圳)有限公司 Image processing method and device and computer storage medium
CN112541868A (en) * 2020-12-07 2021-03-23 影石创新科技股份有限公司 Image processing method, image processing device, computer equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120294527A1 (en) * 2011-05-19 2012-11-22 Rastislav Lukac Method for processing highlights and saturated regions in a digital image
CN103618887A (en) * 2013-11-29 2014-03-05 深圳Tcl新技术有限公司 Method and device for processing image
CN105631826A (en) * 2015-12-25 2016-06-01 武汉鸿瑞达信息技术有限公司 Color image saturation enhancing method and system
CN108876742A (en) * 2018-06-25 2018-11-23 深圳市华星光电技术有限公司 image color enhancement method and device
CN109741279A (en) * 2019-01-04 2019-05-10 Oppo广东移动通信有限公司 Image saturation method of adjustment, device, storage medium and terminal
CN111163268A (en) * 2020-01-09 2020-05-15 腾讯科技(深圳)有限公司 Image processing method and device and computer storage medium
CN112541868A (en) * 2020-12-07 2021-03-23 影石创新科技股份有限公司 Image processing method, image processing device, computer equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115731861A (en) * 2022-11-18 2023-03-03 武汉路特斯汽车有限公司 Screen color adjusting method and device and terminal

Also Published As

Publication number Publication date
CN112541868A (en) 2021-03-23

Similar Documents

Publication Publication Date Title
WO2022121893A1 (en) Image processing method and apparatus, and computer device and storage medium
CN109639982B (en) Image noise reduction method and device, storage medium and terminal
US9826149B2 (en) Machine learning of real-time image capture parameters
US7542600B2 (en) Video image quality
US10878543B2 (en) Group management method, terminal, and storage medium
US10565742B1 (en) Image processing method and apparatus
WO2018176925A1 (en) Hdr image generation method and apparatus
US10033918B2 (en) Method and system for image processing to detect salient objects in image
US8675102B2 (en) Real time denoising of video
CN113132695B (en) Lens shading correction method and device and electronic equipment
CN110855958B (en) Image adjusting method and device, electronic equipment and storage medium
US20220174222A1 (en) Method for marking focused pixel, electronic device, storage medium, and chip
WO2023137956A1 (en) Image processing method and apparatus, electronic device, and storage medium
WO2022151852A1 (en) Image processing method, apparatus, and system, electronic device, and storage medium
US11620738B2 (en) Hue preservation post processing with early exit for highlight recovery
JP2019513335A (en) Method for detecting saturated pixel, detection device, color correction device, electronic device and storage medium
CN113870100A (en) Image processing method and electronic device
CN115660997B (en) Image data processing method and device and electronic equipment
WO2022111269A1 (en) Method and device for enhancing video details, mobile terminal, and storage medium
WO2023151210A1 (en) Image processing method, electronic device and computer-readable storage medium
CN110874816B (en) Image processing method, device, mobile terminal and storage medium
US20170295317A1 (en) Adaptive output correction for digital image capture processing
CN111915529A (en) Video dim light enhancement method and device, mobile terminal and storage medium
CN112419217B (en) Image processing method, device, computer equipment and medium
US11430093B2 (en) Face-based tone curve adjustment

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: 21902598

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: 21902598

Country of ref document: EP

Kind code of ref document: A1