Image processing method and device for reducing color noise and removing pseudo color, and related equipment
By calculating the edge intensity and confidence in the RGB image and adjusting the filter weight of the YUV image, the pseudo-color problem during UV channel noise reduction is solved, effective noise reduction and pseudo-color removal in the edge area of the image is achieved, and image processing is improved efficiency.
Patent Information
- Application Number
- CN202411250661.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2024-12-13
AI Technical Summary
When using UV channel for color reduction noise, color overflow and pseudo-color are prone to occur, especially in the edge areas of the image, resulting in pseudo-color residue.
By acquiring images in RGB and YUV formats, the edge intensity and confidence of each pixel point are calculated, the filter weight is adjusted to reduce pseudo-color, and the confidence is calculated based on image gradient intensity and saturation, and the UV channel is then reduced.
Effectively reduce pseudo-color at the edge of the image, improve noise reduction effect, and reduce the cost and difficulty of image processing, and improve the efficiency of image processing.
Smart Images

Figure CN119130848A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing, and in particular to an image processing method, device and related equipment for reducing color noise and removing pseudo-color. Background Art
[0002] Color noise and pseudo color may exist in the image at the same time. Pseudo color is the wrong color in the image, and color noise is the low-frequency noise in the image.
[0003] Currently, UV channel (chrominance channel) is usually used for color noise reduction, that is, the corresponding weighted weights are calculated according to the similarity of the UV channel between the current pixel and the neighboring pixels in the YUV (a color encoding method) image, and then the calculated weighted weights are used to weight the neighboring pixels to obtain the noise reduction result for the current pixel.
[0004] However, when using the UV channel for color noise reduction, color overflow is prone to occur, resulting in pseudo color. U and V are different chromaticities (Y can represent color difference blue, V can represent color difference red), and UV information only contains low-frequency information of the image, with low contrast, which makes the similarity of neighboring pixels high and difficult to distinguish, that is, it is difficult to distinguish the edge of the image. Therefore, pseudo color often occurs at the edge of the image and in the high-frequency area, which means that when using the UV channel for color noise reduction, more pseudo color may remain at the edge of the image. Summary of the invention
[0005] In view of this, the present application aims to provide an image processing method, apparatus and related equipment for reducing color noise and removing pseudo colors, so as to effectively reduce pseudo colors while reducing color noise.
[0006] In a first aspect, an embodiment of the present application provides an image processing method for color noise reduction and pseudo-color removal, comprising: obtaining a first format image and a YUV image of the same image to be processed; the first format image and the YUV image are images of two different formats, respectively, and the pixels in the first format image and the pixels in the YUV image correspond to each other; determining the edge strength corresponding to each pixel in the first format image; the edge strength corresponding to any pixel represents the probability that the pixel is the edge of the image area; determining the confidence corresponding to each pixel in the YUV image based on the edge strength of each pixel in the first format image; the confidence corresponding to any pixel represents the intensity of the pixel participating in filtering and denoising; and performing denoising on the pixels of each UV channel in the YUV image based on the confidence corresponding to each pixel in the YUV image.
[0007] The current method for reducing color noise is not effective for the pseudo-color that often appears at the edge of the image, because pseudo-color often appears at the edge of the image. In an embodiment of the present application, the first format image and the YUV image are images of the same image to be processed in different formats, and each pixel of the two corresponds to each other. The edge strength of each pixel is calculated in the first format image to confirm the probability that each pixel is on the edge, and then the color noise reduction algorithm can be made to remove the pseudo-color on the edge of the image by reducing the weight of the filter that the pixel on the edge participates in the original color noise reduction. Among them, the confidence of each point participating in the filtering can be determined by the edge strength, and then the pixel on the edge of the image is used with a lower confidence, so that these pixels participate in the filtering less, thereby reducing the pseudo-color points on the edge of the image. Thus, while retaining the image features of the edge area, the pseudo-color existing in the edge area can be effectively denoised, thereby achieving the reduction of the pseudo-color originally existing at the edge of the image while reducing the color noise.
[0008] In one embodiment, the first format image is an RGB (Red Green Blue) image.
[0009] In the embodiment of the present application, since the UV information in the YUV image has insufficient ability to distinguish the image content, compared with the YUV image, the RGB image has a stronger ability to distinguish the image content than the YUV image. Therefore, the edge strength determined by using the RGB image is more accurate, which helps to improve the accuracy of the calculated confidence level, thereby improving the effect of denoising the YUV image. In addition, since the method simultaneously completes the color noise reduction and the reduction of pseudo color generation in image processing, there is no need to remove pseudo color after color noise reduction, which can effectively improve the efficiency of image processing.
[0010] In one embodiment, obtaining a first format image and a YUV image of the same image to be processed includes: converting a pre-acquired YUV image or RGB image based on a preset format conversion relationship between the YUV format and the RGB format to obtain a corresponding RGB image or YUV image.
[0011] YUV images and RGB images can be converted to each other. Therefore, in the embodiment of the present application, after the RGB image and the YUV image are collected, the image in any format can be converted to an image in another format by converting the RGB image and the YUV image to each other. Therefore, there is no need to obtain a specific image, thereby reducing the cost and difficulty of image acquisition and noise reduction.
[0012] In one embodiment, determining the edge strength corresponding to each pixel in the first format image includes: determining the image gradient strength corresponding to each pixel in the RGB image based on different color component values of each pixel in the RGB image and a preset gradient conversion relationship; the image gradient strength is used to characterize the edge strength of the pixel; the gradient conversion relationship includes a conversion relationship between different color component values of the pixel in the RGB format and the image gradient strength.
[0013] Image gradient intensity is widely used in image analysis, mainly to help detect object contours and separate uniform areas. Therefore, in the embodiments of the present application, the image gradient intensity is used to characterize the edge intensity of pixel points, which has a certain accuracy and helps to improve the accuracy of the determined edge intensity and confidence, thereby improving the color noise reduction and anti-aliasing effects.
[0014] In one embodiment, the gradient conversion relationship includes a first sub-conversion relationship between a red component value, a green component value, a blue component value and a color component gradient intensity, respectively, and a second sub-conversion relationship between the image gradient intensity and the color component gradient intensity of each of the red component value, the green component value, and the blue component value; based on different color component values of each pixel in the RGB image and a preset gradient conversion relationship, the image gradient intensity corresponding to each pixel in the RGB image is determined, including: for each pixel, using the first sub-conversion relationship to calculate the color component gradient intensity corresponding to the red component value, the green component value, and the blue component value of the pixel respectively; using the second sub-conversion relationship to sum the color component gradient intensities corresponding to the red component value, the green component value, and the blue component value respectively, to obtain the image gradient intensity corresponding to the pixel.
[0015] In an embodiment of the present application, the pixels of the RGB image include different color components. The calculation of the image gradient intensity of the pixel points is decomposed into the separate calculation and summation of the gradient intensities of different color components. This can simplify the calculation complexity of the image gradient intensity, improve calculation efficiency and reduce power consumption.
[0016] In one embodiment, the first sub-conversion relationship includes a conversion relationship between a preset operator and color component gradient intensities corresponding to the red component value, the green component value, and the blue component value of the pixel point.
[0017] In one embodiment, the preset operator includes a Kernel operator, the Kernel operator includes KernelHor and KernelVer, and the gradient conversion relationship includes:
[0018]
[0019] Grad=Gradr +Grad g +Grad b
[0020] Wherein, R is the red component value of the pixel, G is the green component value of the pixel, B is the blue component value of the pixel, Grad is the image gradient intensity of the pixel, and Grad is the image gradient intensity of the pixel. r is the color component gradient intensity corresponding to the red component value, the Grad g is the color component gradient intensity corresponding to the green component value, the Grad b is the color component gradient intensity corresponding to the blue component value, is the symbol of the convolution operation, the KernelHor and the KernelVer are different preset operators, and as well as
[0021] As shown in the above formula, the calculation method of the image gradient strength is relatively simple. On this basis, the embodiment of the present application provides a simple calculation method of the image gradient strength, which helps to improve the efficiency of determining the edge strength and reduce the power consumption of determining the edge strength, thereby making the image denoising have a certain effect while reducing power consumption.
[0022] In one embodiment, the confidence corresponding to each pixel in the YUV image is determined based on the edge strength of each pixel in the first format image, including: for each pixel in the YUV image, the saturation corresponding to the pixel is determined based on different chromaticity values of the pixel and a preset saturation conversion relationship; the saturation conversion relationship includes a conversion relationship between different chromaticity values and saturation; the confidence of the pixel is determined based on the saturation corresponding to the pixel, the image gradient strength of the pixel corresponding to the pixel in the RGB image, and a preset confidence conversion relationship; the confidence conversion relationship includes a conversion relationship between saturation, image gradient strength, and confidence.
[0023] Saturation is related to color and can be used to distinguish image edges to a certain extent. In the embodiment of the present application, when calculating the confidence, the confidence is calculated together with the saturation and the image gradient strength, which can further deepen the correlation between the confidence and the image edge, thereby improving the accuracy of noise reduction based on the confidence and improving the noise reduction effect.
[0024] In one embodiment, the saturation conversion relationship includes: Sat=abs(U-0.5)+abs(V-0.5); wherein, abs is an absolute value calculation, U and V are respectively values of different chromaticities in the YUV format, and Sat represents confidence.
[0025] In an embodiment of the present application, a simple saturation calculation method is provided, which can reduce the power consumption required for calculating the saturation and improve the efficiency of determining the saturation while ensuring that the calculated saturation has a certain accuracy.
[0026] In one embodiment, the confidence conversion relationship includes: Among them, the (x, y) represents the coordinates of the pixel point, the Score(x, y) represents the confidence of the pixel point with coordinates (x, y), the exp is an exponential operation, the sigma1 is a preset constant value, the Grad(x, y) represents the image gradient intensity of the pixel point with coordinates (x, y), and the Sat(x, y) represents the saturation of the pixel point with coordinates (x, y).
[0027] If the pixel point is at the edge of the image, the probability of generating false color by filtering the pixel point is greater. Therefore, in the embodiment of the present application, it is necessary to reduce the confidence of the pixel points at the edge of the image participating in the filter, so the confidence is negatively correlated with the image gradient strength. Since the image gradient strength and saturation are both related to the image edge, multiplying the image gradient strength and saturation can further associate the confidence with the image gradient strength and saturation, thereby improving the accuracy and reliability of using confidence to characterize the strength of the pixel points participating in filtering and noise reduction, thereby improving the noise reduction effect.
[0028] In one embodiment, the denoising process is performed on the pixels of each UV channel in the YUV image based on the confidence corresponding to each pixel in the YUV image, including: for the target pixel in the RGB image: calculating the pixel difference between the target pixel and its adjacent neighbourhood pixel; obtaining the confidence corresponding to the neighbourhood pixel; calculating the weighted weight of the neighbourhood pixel based on the confidence corresponding to the neighbourhood pixel, the pixel difference between the target pixel and the neighbourhood pixel, and a preset weighted weight conversion relationship; based on the weighted weights of all the neighbourhood pixels of the target pixel, weighted processing is performed on different chromaticity values of the pixels in the YUV image corresponding to each of the neighbourhood pixels to obtain a denoising result for the target pixel; wherein the target pixel is any pixel in the RGB image.
[0029] The current denoising method may cause color overflow, thereby affecting the neighboring pixels of the pixel point and causing pseudo-color. In the embodiment of the present application, the target pixel point can be denoised based on the neighboring pixels to improve the effect of denoising. The pixel difference between the target pixel point and the neighboring pixel point can characterize the difference between the target pixel point and the neighboring pixel point. When calculating the weighted weight, compared with only using the confidence to calculate the weighted weight, the pixel difference and the confidence are combined to calculate the weighted weight, which takes into account the influence of the neighboring pixel points on the target pixel point, thereby improving the accuracy of the determined weighted weight, and thus improving the denoising effect.
[0030] In an embodiment of the present application, when calculating the weighted processing of pixel points participating in color noise reduction based on confidence, the weighted weight is also calculated in combination with the neighborhood pixel points near the target pixel point, which can effectively improve the effect of noise reduction on the target pixel point.
[0031] In one embodiment, the weighted weight conversion relationship includes:
[0032]
[0033] Among them, (x, y) is the coordinate of the target pixel point, (x+k1, y+k2) represents the neighborhood pixel point of the target pixel point (x, y), and k1∈[-r, r], k2∈[-r1, r2] are the neighborhoods, and r, r1, r2 are preset constants; Score(x+k1, y+k2) represents the confidence of the pixel point with coordinates (x+k1, y+k2); Diff(x, y, k1, k2) is the pixel difference between the pixel point (x+k1, y+k2) and the pixel point (x, y), exp is an exponential operation, W(x, y, k1, k2) represents the weighted weight of the pixel point with coordinates (x+k1, y+k2), and Sigma is a preset constant empirical value.
[0034] In the embodiment of the present application, the greater the confidence of the pixel point, the greater the weighted weight of the pixel point, and the greater the intensity of the noise reduction required. The greater the pixel difference between the neighborhood pixel point and the target pixel point, the greater the difference between the neighborhood pixel point and the target pixel point, and the greater the possibility that the neighborhood pixel point and the target pixel point are image edges. Therefore, the smaller the weighted weight of the neighborhood pixel point, the smaller the correlation with the target pixel point, and the smaller the noise reduction intensity determined for the target pixel point based on the neighborhood pixel point. The above-mentioned weighted weight conversion relationship takes into account the influence of the neighborhood pixel point on the target pixel point, which helps to improve the accuracy of the determined weighted weight, and thus improve the noise reduction effect.
[0035] In a second aspect, an embodiment of the present application provides an image processing device for reducing color noise and removing pseudo-color, comprising: an acquisition module, used to acquire a first format image and a YUV image of the same image to be processed; the first format image and the YUV image are images of two different formats respectively, and the pixels in the first format image and the pixels in the YUV image correspond to each other; an edge distinction module, used to determine the edge strength corresponding to each pixel in the first format image; the edge strength corresponding to any pixel represents the probability that the pixel is the edge of the image area; a confidence determination module, used to determine the confidence corresponding to each pixel in the YUV image based on the edge strength of each pixel in the first format image; the confidence corresponding to any pixel represents the intensity of the pixel participating in filtering and denoising; a denoising module, used to perform denoising on the pixels of each UV channel in the YUV image based on the confidence corresponding to each pixel in the YUV image.
[0036] In a third aspect, an embodiment of the present application provides a processor, comprising: a processing unit and a storage unit; a program is stored in the storage unit, and when the program is executed by the processing unit, the processing unit executes the image processing method for reducing color noise and removing pseudo-color as described in any one of the first aspects.
[0037] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising the processor as described in the third aspect.
[0038] In a fifth aspect, an embodiment of the present application provides a readable storage medium, in which a program is stored. When the program is run on a processing unit, the processing unit executes the image processing method for reducing color noise and removing aliasing as described in any one of the first aspects. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0040] Figure 1 A flowchart of an image processing method for reducing color noise and removing pseudo-color provided in one embodiment of the present application;
[0041] Figure 2 A schematic diagram of a first effect of color noise reduction and color aliasing removal provided by an embodiment of the present application;
[0042] Figure 3 A schematic diagram of a second effect of color noise reduction and color aliasing removal provided by an embodiment of the present application;
[0043] Figure 4 A schematic diagram of a third effect of color noise reduction and color pseudo-removal provided by an embodiment of the present application;
[0044] Figure 5 A schematic diagram of a fourth effect of color noise reduction and color aliasing removal provided by an embodiment of the present application;
[0045] Figure 6 A schematic diagram of an image processing device for reducing color noise and removing pseudo-color provided by an embodiment of the present application.
[0046] Icon: image processing device 600 for reducing color noise and removing pseudo-color; acquisition module 610; edge distinction module 620; confidence determination module 630; noise reduction module 640. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0048] First, the present application provides an image processing method for reducing color noise and removing pseudo-color. Figure 1 , Figure 1 A flowchart of an image processing method for reducing color noise and removing pseudo-color is provided in an embodiment of the present application. The image processing method for reducing color noise and removing pseudo-color includes:
[0049] S110, obtaining a first format image and a YUV image of the same image to be processed.
[0050] In this embodiment, the first format image and the YUV image are images of the same image to be processed in different formats. The formats of the first format image and the YUV image are different, but each pixel in the image of one format has a corresponding pixel in the image of the other format, that is, the pixels in the first format image and the pixels in the YUV image correspond to each other. Among them, the first format image and the YUV image can be converted from images to be processed of other formats. For example, the YUV image can be converted from an HSV (Hue Saturation Value, a color model) image. The conversion method between images can refer to the prior art. The present application does not limit the format of the image to be processed. The image format of the image to be processed can be any image format that can be converted into the first format and the YUV format.
[0051] In an embodiment of the present application, the first format image is an image that can reflect a step change in pixel grayscale. For example, the first format image can be an RGB image, a grayscale image, a bitmap, etc. The method provided in the present application will be described later using the RGB image as an example. In the method provided in the present application, the RGB image is also replaced by other first format images, which is not limited here.
[0052] Meanwhile, RGB images and YUV images can also be converted to each other. Therefore, in this embodiment, the image to be denoised can be one of the RGB image and the YUV image.
[0053] Correspondingly, obtaining an RGB image and a YUV image of the same image to be processed may include: obtaining a YUV image, converting the YUV image based on a preset format conversion relationship between the YUV format and the RGB format, and obtaining a corresponding RGB image.
[0054] Similarly, a YUV image may be obtained based on an RGB image, and the process may include: obtaining an RGB image, converting the RGB image based on a preset format conversion relationship between the YUV format and the RGB format, and obtaining a corresponding YUV image.
[0055] In one embodiment of the present application, the format conversion relationship between the YUV format and the RGB format may include:
[0056] R=Y+1.4075*(V-128)
[0057] G=Y-0.3455*(U-128)-0.7169*(V-128)
[0058] B=Y+1.779*(U-128)
[0059] Among them, R, G, and B represent the different color component values of the same pixel in the RGB image, R is the red component value, G is the green component value, and B is the blue component value. U and V represent the different chromaticity values of the same pixel in the YUV image, and Y represents the brightness of the pixel in the YUV image.
[0060] The above format conversion relationship is used to convert the RGB image to the YUV image between the same pixel points in the image to be processed. The above format conversion relationship can also be used to reversely deduce the YUV format image into the RGB image, and other format conversion relationships can also be used to deduce the YUV format into the RGB image, which is not limited here. When all pixels in the RGB image or all pixels in the YUV image are converted, it can be determined that the conversion between images of different formats is completed, and the RGB image and YUV image of the same image to be processed are obtained.
[0061] In addition, there are currently other format conversion relationships between YUV format and RGB format. Other format conversion relationships can use other parameter values or other calculation methods. The above is only an example provided by this application and should not be a limitation to this application.
[0062] In other embodiments, RGB images or YUV images can also be obtained by converting images in other formats. For example, RGB images and YUV images can be obtained by converting images to be processed in RAW (raw image file), HSV (Hue Saturation Value, a color model) or other types of formats. The format conversion between different images can refer to the existing technology and will not be expanded here.
[0063] By converting between images of different formats, image noise reduction can be achieved without obtaining specific images, effectively reducing the cost and difficulty of image noise reduction.
[0064] S120, determining the edge strength corresponding to each pixel point in the first format image.
[0065] In this embodiment, the edge strength corresponding to any pixel point represents the probability that the pixel point is the edge of the image region.
[0066] Pseudo-color often occurs at the edge of an image or in a high-frequency area. Since the current color noise reduction method cannot distinguish the edge of an image well, when the existing method is used for color noise reduction, strong color overflow may occur in the edge area, thereby leaving more pseudo-color. Therefore, in an embodiment of the present application, the probability that the pixel is the edge of the image area can be characterized by determining the edge strength of each pixel, so that the probability of pseudo-color occurring in the pixel can be determined by the edge strength, and then whether the pixel needs to be reduced in color noise or the degree of color noise reduction can be determined.
[0067] In YUV images, U and V have high similarity, which is not conducive to distinction. Compared with YUV images, R, G, and B of pixels in RGB images have high differences. Therefore, compared with YUV images, using RGB images to determine edge strength can effectively improve the accuracy of the determined edge strength, thereby reducing color noise and removing pseudo-color effects.
[0068] Taking the first format image as an RGB image as an example, in one embodiment, determining the edge strength corresponding to each pixel in the first format image may include: determining the image gradient strength corresponding to each pixel in the RGB image based on different color component values of each pixel in the RGB image and a preset gradient conversion relationship.
[0069] In this embodiment, the image gradient intensity can be used to characterize the edge intensity of the pixel point. Image gradient intensity is widely used in image analysis, mainly to help detect object contours and separate uniform areas. Therefore, using image gradient intensity to characterize edge intensity has a certain degree of accuracy and helps to improve the effects of noise reduction and color removal.
[0070] As mentioned above, the embodiment of the present application can calculate the image gradient intensity through the RGB image, and each pixel in the RGB image has a corresponding red component value, green component value, and blue component value. Therefore, in this embodiment, the gradient conversion relationship may include the conversion relationship between different color component values of the pixel in the RGB format and the image gradient intensity.
[0071] Different color components of an RGB image can all be used to calculate gradient intensity, but the gradient intensity calculated using only some of the color components is not sufficient to ensure the overall image gradient intensity of the entire image. Therefore, in an embodiment of the present application, for the same pixel point, the color component gradient intensities corresponding to the red component value, green component value, and blue component value of the pixel point can be calculated respectively, and then the image gradient intensity corresponding to the pixel point can be calculated based on the gradient intensities of each color component.
[0072] Therefore, in an embodiment of the present application, the gradient conversion relationship may include two parts, one part is a first sub-conversion relationship between the red component value, the green component value, the blue component value and the color component gradient intensity respectively, and the second part is a second conversion relationship between the image gradient intensity of the pixel point and the color component gradient intensity of the red component value, the green component value, the blue component value respectively.
[0073] Therefore, in this embodiment, for each pixel, the color component gradient intensities corresponding to the red component value, green component value, and blue component value of the pixel can be calculated using the first sub-conversion relationship; and then the color component gradient intensities corresponding to the red component value, green component value, and blue component value can be summed using the second sub-conversion relationship to obtain the image gradient intensity corresponding to the pixel. The calculation of the image gradient intensity of the pixel is decomposed into the separate calculation and summation of the gradient intensities of different color components, which helps to simplify the calculation complexity of the image gradient intensity, improve the calculation efficiency, and reduce power consumption.
[0074] In an embodiment of the present application, the first sub-conversion relationship may include a conversion relationship between a preset operator and color component gradient intensities corresponding to the red component value, green component value, and blue component value of a pixel point.
[0075] For example, in one embodiment of the present application, the preset operator includes a Kernel operator, the Kernel operator includes KernelHor and KernelVer, the gradient conversion relationship may include a first sub-conversion relationship and a second sub-conversion relationship, and the first sub-conversion relationship includes:
[0076]
[0077] The second sub-conversion relationship includes:
[0078] Grad=Grad r +Grad g +Grad b
[0079] Among them, R is the red component value of the pixel, G is the green component value of the pixel, B is the blue component value of the pixel, Grad is the image gradient intensity of the pixel, and Grad is the image gradient intensity of the pixel. r is the color component gradient intensity corresponding to the red component value, Grad g is the color component gradient intensity corresponding to the green component value, the Grad b is the color component gradient intensity corresponding to the blue component value, is the symbol of the convolution operation, the KernelHor and the KernelVer are different preset operators, and as well as Symbol "II" indicates absolute value calculation. As shown in the above formula, the calculation method of image gradient strength is relatively simple, on this basis, it helps to improve the efficiency of edge strength determination and reduce the power consumption of edge strength determination, thereby making image denoising have a certain effect while reducing power consumption.
[0080] In some other embodiments, other operators may be used to calculate the image gradient intensity, for example, one-dimensional Roberts operator, Sobel operator and Prewitt operator, or two-dimensional Laplace operator, etc., which are not limited here.
[0081] There are many ways to calculate the image gradient strength, and you can refer to the existing technology for details. In other embodiments of the present application, other calculation methods can also be used to calculate the image gradient strength of each pixel point. The above is only an example and should not be a limitation to the present application.
[0082] In addition, in some other embodiments, in addition to calculating the image gradient strength, other methods can also be used to calculate the edge strength, for example, using a Gaussian derivative filter, a Canny edge detector, a first-order differential edge operator, a Roberts edge detection operator, a Prewitt edge detection operator, a Sobel edge detection operator, a second-order differential operator, etc. The specific calculation method can refer to the existing technology and will not be expanded here.
[0083] When selecting different methods for determining edge strength, the requirements of power consumption and accuracy can be combined. For example, in some scenarios with high power consumption requirements, some accuracy can be abandoned and a method with simple calculation and high efficiency can be selected, such as the gradient conversion relationship provided in the above embodiment. Conversely, in other scenarios with high accuracy requirements, a method with more accurate calculated edge strength can be selected.
[0084] S130, determining the confidence corresponding to each pixel in the YUV image based on the edge strength of each pixel in the first format image.
[0085] The confidence level corresponding to any pixel represents the strength of the pixel participating in filtering and denoising, and filtering and denoising is used to perform color noise reduction processing on the pixel.
[0086] It can be understood that for a pixel point that may be an image edge, since it is more likely to have pseudo color when participating in filtering, the pixel point may not be filtered to reduce color noise or the intensity of filtering and denoising the pixel point may be reduced. On the contrary, if the pixel point is more likely not to belong to the image edge, the pixel point needs to be filtered to reduce noise or the intensity of filtering and denoising is increased. Therefore, in an embodiment of the present application, the intensity of each pixel point participating in filtering and denoising can be determined by the edge intensity of each pixel point calculated by the first format image.
[0087] In one embodiment of the present application, the confidence corresponding to each pixel in the YUV image is determined based on the edge strength of each pixel in the first format image, including: for each pixel in the YUV image, the saturation corresponding to the pixel is determined based on the different chromaticity values of the pixel and a preset saturation conversion relationship; the confidence of the pixel is determined based on the saturation corresponding to the pixel, the image gradient strength of the pixel corresponding to the pixel in the RGB image, and a preset confidence conversion relationship.
[0088] Saturation refers to the purity of image color and the vividness of color. It is one of the important attributes that affect the final color effect and can also be used to characterize whether the pixel is related to the edge area of the image. Therefore, in the embodiment of the present application, in addition to the edge strength, the confidence of each pixel can also be calculated in combination with the saturation of the pixel to further deepen the correlation between the confidence and the edge of the image, thereby improving the accuracy of noise reduction based on confidence and improving the effect of noise reduction.
[0089] The U information and V information in the YUV image are used to describe the image color and saturation, and are used to specify the color of the pixel. Therefore, in an embodiment of the present application, the YUV image can be used to calculate the saturation of each pixel, and the determined saturation has a high accuracy.
[0090] In this embodiment, the saturation conversion relationship includes the conversion relationship between different chromaticity values and saturation. Exemplarily, the saturation conversion relationship may include:
[0091] Sat=abs(U-0.5)+abs(V-0.5)
[0092] Among them, abs is the absolute value calculation, U and V are the values of different chromaticities in the YUV format, Sat represents the confidence level, and 0.5 represents gray.
[0093] The saturation conversion relationship provided in the above embodiment is simple to calculate, and can reduce the power consumption required for calculating the saturation and improve the efficiency of determining the saturation while making the calculated saturation have a certain accuracy. In other embodiments, the saturation can also be calculated by other calculation methods, which will not be expanded here. The above is only an example and should not be a limitation to the present application.
[0094] After obtaining the saturation of each pixel, for each pixel, the confidence of the pixel can be determined based on the saturation corresponding to the pixel, the image gradient strength of the pixel corresponding to the pixel in the RGB image, and a preset confidence conversion relationship.
[0095] In this embodiment, the confidence conversion relationship includes the conversion relationship between saturation, image gradient strength, and confidence. Through the confidence conversion relationship, the saturation and image gradient strength of each pixel can be converted into the confidence of the pixel participating in filtering and noise reduction.
[0096] In one embodiment, the confidence conversion relationship includes:
[0097] Score(x,y)=exp(-Grad(x,y)*Sat(x,y) / sigma1)
[0098] Among them, (x, y) represents the coordinates of the pixel point, Score(x, y) represents the confidence of the pixel point with coordinates (x, y), exp is an exponential operation, sigma1 is a preset constant value, Grad(x, y) represents the image gradient intensity of the pixel point with coordinates (x, y), and Sat(x, y) represents the saturation of the pixel point with coordinates (x, y).
[0099] In this embodiment, coordinates may be set for each pixel in the RGB image and the YUV image based on the same coordinate system, and the pixels in the RGB image and the YUV image with the same coordinates may be considered to correspond to each other.
[0100] In the above confidence conversion relationship, sigma1 is a preset constant value, which can be obtained through a large number of experimental calculations. For example, in one embodiment of the present application, sigma1 can be set to 0.1. The empirical value in different scenarios may be different, which is not limited here.
[0101] If the pixel is at the edge of the image, the greater the possibility of false color appearing when filtering it, the lower the intensity of noise reduction. Therefore, the confidence is negatively correlated with the image gradient intensity, so that the pixel points belonging to the edge participate in filtering less, thereby reducing the false color points on the edge of the image. Multiplying the image gradient intensity and saturation can make the confidence associated with the image gradient intensity and saturation, so as to improve the accuracy and reliability of using confidence to characterize the intensity of pixel points participating in filtering and noise reduction, thereby improving the noise reduction effect.
[0102] S140, performing noise reduction processing on the pixel points of each UV channel in the YUV image based on the confidence level corresponding to each pixel point in the YUV image.
[0103] In the embodiment of the present application, the confidence level corresponding to any pixel point represents the strength of the pixel point in participating in filtering noise reduction. Therefore, in the embodiment of the present application, the strength of the noise reduction processing for the pixel point can be configured in proportion according to the confidence level of each pixel point, and then the noise of the point can be reduced using the configured noise reduction processing strength. The noise reduction processing method can refer to the existing technology, for example, using the existing UV channel color noise reduction method, or using other color noise reduction methods, which are not limited here.
[0104] In one embodiment of the present application, color noise reduction processing is performed on the pixels of each UV channel in the YUV image based on the confidence corresponding to each pixel in the YUV image, and it can also include: first, for the target pixel in the RGB image: calculating the pixel difference between the target pixel and its adjacent neighborhood pixel; then, obtaining the confidence corresponding to the neighborhood pixel; then, based on the confidence corresponding to the neighborhood pixel, the pixel difference between the target pixel and the neighborhood pixel, and a preset weighted weight conversion relationship, the weighted weight of the neighborhood pixel is calculated; finally, based on the weighted weights of all neighborhood pixels of the target pixel, weighted processing is performed on different chromaticity values of the pixel corresponding to each neighborhood pixel in the YUV image to obtain the color noise reduction result for the target pixel.
[0105] The current color noise reduction method may cause color overflow, thereby affecting the neighboring pixels of the pixel point and causing it to appear pseudo-color. In the embodiment of the present application, the target pixel point can be denoised based on the neighboring pixels to improve the effect of noise reduction. Among them, the pixel difference between the target pixel point and the neighboring pixel point can characterize the difference between the target pixel point and the neighboring pixel point. When calculating the weighted weight, compared with only using the confidence to calculate the weighted weight, the pixel difference and the confidence are combined to calculate the weighted weight, which takes into account the influence of the neighboring pixel points on the target pixel point, thereby improving the accuracy of the determined weighted weight, and thus improving the noise reduction effect.
[0106] In this embodiment, the confidence of each pixel can be used to calculate the weighted weight, and the weighted weight can be used to characterize the degree to which the pixel participates in filtering and noise reduction. There are usually certain color differences between different image regions, so in this embodiment, the weighted weight of each pixel can also be calculated in combination with the pixel difference between adjacent pixels.
[0107] In this embodiment, the target pixel is any pixel in the RGB image, the neighborhood pixel is a pixel near the target pixel, and the coordinate difference between the neighborhood pixel and the target pixel is within a preset range, so the neighborhood pixel can also be understood as being adjacent to the target pixel. Exemplarily, the coordinates of the target pixel are (x, y), and the coordinates of the neighborhood pixel of the target pixel (x, y) can be expressed as (x+k1, y+k2), where k1∈[-r, r], k2∈[-r1, r2], r, r1, r2 are preset constants, and r, r1, r2 can be the same or different.
[0108] In this embodiment, the target pixel point is an image in an RGB image. Therefore, when calculating the pixel difference between the target pixel point and its adjacent neighborhood pixel points, for the target pixel point and any neighboring pixel point, the color component differences between different color components can be calculated respectively, and then the different color component differences are summed to obtain the pixel value of the pixel point.
[0109] For example, it can be expressed as:
[0110] Diff(x, y, k1, k2)
[0111] =abs(R(x,y)-R(x+k1,y+k2))
[0112] +abs(G(x,y)-G(x+k1,y+k2))
[0113] +abs(B(x,y)-B(x+k1,y+k2))
[0114] Wherein, (x, y) is the coordinate of the target pixel, (x+k1, y+k2) is the coordinate of the neighborhood pixel of the target pixel (x, y), R(x, y), G(x, y), and B(x, y) are the different color components of the target pixel, R(x+k1, y+k2), G(x+k1, y+k2), and B(x+k1, y+k2) are the different color components of the neighborhood pixel, abs is the absolute value calculation, abs(R(x, y)-R(x+k1, y+k2)), abs(G(x, y)-G(x+k1, y+k2)), and abs(B(x, y)-B(x+k1, y+k2)) are the differences of different color components, and Diff(x, y, k1, k2) is the pixel difference between the neighborhood pixel (x+k1, y+k2) and the target pixel (x, y).
[0115] After calculating the pixel difference between the target pixel and each neighboring pixel, the weighted weights between the target pixel and the neighboring pixel are calculated respectively in combination with the preset confidence conversion relationship and the confidence of each neighboring pixel.
[0116] In one embodiment of the present application, the weighted weight conversion relationship may include:
[0117]
[0118] Among them, (x, y) are the coordinates of the target pixel point, (x+k1, y+k2) represent the coordinates of the neighborhood pixel points of the target pixel point (x, y), and k1∈[-r, r], k2∈[-r1, r2] are the neighborhoods, r, r1, r2 are preset constants; Score(x+k1, y+k2) represents the confidence of the pixel point with coordinates (x+k1, y+k2); Diff(x, y, k1, k2) is the pixel difference between the pixel point (x+k1, y+k2) and the pixel point (x, y), exp is the exponential operation, W(x, y, k1, k2) represents the weighted weight of the pixel point with coordinates (x+k1, y+k2), and Sigma is the preset constant empirical value.
[0119] The above is only one method of calculating weighted weights provided in the present application. In other embodiments, pixel differences and confidence levels may be used to calculate weighted weights in other ways, which are not limited here.
[0120] After determining the weighted weights of all neighboring pixels of the target pixel, weighted processing can be performed on different chromaticity values of the pixels corresponding to the neighboring pixels in the YUV image to obtain a color noise reduction result for the target pixel.
[0121] For example, the different chromaticities are U and V, and the weighted processing process can be expressed as:
[0122]
[0123] Among them, NRU(x, y) represents the result of denoising the chromaticity U of the target pixel, NRV(x, y) represents the result of denoising the chromaticity V of the target pixel, U(x+k1, y+k2) represents the value of the chromaticity U of the neighboring pixel (x+k1, y+k2), V(x+k1, y+k2) represents the value of the chromaticity V of the neighboring pixel (x+k1, y+k2), and the other parameters are the same as above.
[0124] In the embodiment of the present application, the denoising process for the YUV image may specifically refer to the existing UV channel color noise reduction method, which will not be elaborated here.
[0125] For ease of understanding, the schematic diagram of the effect of color noise reduction and color pseudo-removal provided in an embodiment of the present application is shown in FIG. Figure 2 , Figure 2 Schematic diagram of the same image in different states. The upper left corner is a schematic diagram of image gradient intensity, the upper right corner is a schematic diagram of confidence, the lower left corner is a schematic diagram after simultaneous color noise reduction and color aliasing, and the lower right corner is a schematic diagram of the effect of only color noise reduction using the existing method.
[0126] As shown in the upper left corner, the figure includes three straight lines and two hollow triangles. Referring to the lower left corner, the three straight lines are actually the intersection of two color areas, that is, the edge. Similarly, the hollow triangle is actually the edge of the solid triangle, that is, the image gradient intensity represents the edge area of the figure.
[0127] Referring to the upper right figure again, the greater the image gradient intensity of a pixel, the greater the possibility that the pixel is the edge of the image, the smaller its confidence, and the smaller the possibility of participating in noise reduction. Therefore, the image color of the confidence is opposite to the color of the image gradient intensity.
[0128] Comparing the lower left and lower right images, the image edge areas are clearly different. For example, at the intersection of the first graphic area (i.e., the edge of the graphic), the lower left image has less yellow pseudo-color than the lower right image, the intersection of the first graphic area has less light blue pseudo-color, and the third intersection has less yellow pseudo-color. Correspondingly, the pseudo-color on the two triangles is also reduced.
[0129] Refer to Figure 3 , Figure 4 and Figure 5 ,contrast Figures 3 to 5 It can be seen from the lower left and lower right corners of the figure that the false colors are obviously removed at the edges of each image.
[0130] Based on the same inventive concept, the present application also provides an image processing device for reducing color noise and removing pseudo-color. Figure 6 The image processing device 600 for reducing color noise and removing pseudo-color provided in the embodiment of the present application includes: an acquisition module 610, an edge distinction module 620, a confidence determination module 630, and a noise reduction module 640.
[0131] The acquisition module 610 is used to acquire a first format image and a YUV image of the same image to be processed; the pixels in the first format image and the pixels in the YUV image correspond to each other.
[0132] The edge distinguishing module 620 is used to determine the edge strength corresponding to each pixel in the first format image; the edge strength corresponding to any pixel represents the probability that the pixel is the edge of the image region.
[0133] The confidence determination module 630 is used to determine the confidence corresponding to each pixel in the YUV image based on the edge strength of each pixel in the first format image; the confidence corresponding to any pixel represents the strength of the pixel participating in filtering and denoising.
[0134] The noise reduction module 640 is used to perform noise reduction processing on the pixel points of each UV channel in the YUV image based on the confidence level corresponding to each pixel point in the YUV image.
[0135] In an embodiment of the present application, the first format image may be an RGB image.
[0136] The acquisition module 610 is specifically used to convert the pre-acquired YUV image or RGB image based on the preset format conversion relationship between the YUV format and the RGB format to acquire the corresponding RGB image or YUV image.
[0137] The edge distinction module 620 is specifically used to determine the image gradient intensity corresponding to each pixel in the RGB image based on the different color component values of each pixel in the RGB image and a preset gradient conversion relationship; the image gradient intensity is used to characterize the edge intensity of the pixel; the gradient conversion relationship includes the conversion relationship between the different color component values of the pixel in the RGB format and the image gradient intensity.
[0138] The gradient conversion relationship includes a first sub-conversion relationship between the red component value, the green component value, the blue component value and the color component gradient intensity, and a second sub-conversion relationship between the image gradient intensity and the color component gradient intensity of the red component value, the green component value, and the blue component value. The edge distinguishing module 620 is specifically used to calculate the color component gradient intensity corresponding to the red component value, the green component value, and the blue component value of each pixel point using the first sub-conversion relationship; and sum the color component gradient intensity corresponding to the red component value, the green component value, and the blue component value using the second sub-conversion relationship to obtain the image gradient intensity corresponding to the pixel point.
[0139] In one embodiment, the first sub-conversion relationship includes a conversion relationship between a preset operator and color component gradient intensities corresponding to the red component value, the green component value, and the blue component value of the pixel point.
[0140] In one embodiment, the preset operator includes a Kernel operator, the Kernel operator includes KernelHor and KernelVer, and the gradient conversion relationship configured in the edge distinguishing module 620 includes:
[0141]
[0142] Grad=Grad r +Grad g +Grad b
[0143] Wherein, R is the red component value of the pixel, G is the green component value of the pixel, B is the blue component value of the pixel, and Grad is the image gradient intensity of the pixel. r is the color component gradient intensity corresponding to the red component value, the Grad gis the color component gradient intensity corresponding to the green component value, the Grad b is the color component gradient intensity corresponding to the blue component value, is the symbol of the convolution operation, the KernelHor and the KernelVer are different preset operators, and as well as
[0144] The confidence determination module 630 is specifically used to determine the saturation corresponding to each pixel in the YUV image based on the different chromaticity values of the pixel and a preset saturation conversion relationship; the saturation conversion relationship includes the conversion relationship between different chromaticity values and saturation; the confidence of the pixel is determined based on the saturation corresponding to the pixel, the image gradient intensity of the pixel corresponding to the pixel in the RGB image, and a preset confidence conversion relationship; the confidence conversion relationship includes the conversion relationship between saturation, image gradient intensity, and confidence.
[0145] The saturation conversion relationship configured in the confidence determination module 630 includes:
[0146] Sat=abs(U-0.5)+abs(V-0.5)
[0147] Among them, abs is the absolute value calculation, U and V are the values of different chromaticities in the YUV format, and Sat represents the confidence level.
[0148] The confidence conversion relationship configured in the confidence determination module 630 includes:
[0149] Score(x,y)=exp(-Grad(x,y)*Sat(x,y) / sigma1)
[0150] Among them, the (x, y) represents the coordinates of the pixel point, the Score(x, y) represents the confidence of the pixel point with coordinates (x, y), the exp is an exponential operation, the sigma1 is a preset constant value, the Grad(x, y) represents the image gradient intensity of the pixel point with coordinates (x, y), and the Sat(x, y) represents the saturation of the pixel point with coordinates (x, y).
[0151] The denoising module 640 is used to: for a target pixel in the RGB image: calculate the pixel difference between the target pixel and its adjacent neighbourhood pixel points; obtain the confidence corresponding to the neighbourhood pixel points; calculate the weighted weight of the neighbourhood pixel points based on the confidence corresponding to the neighbourhood pixel points, the pixel difference between the target pixel point and the neighbourhood pixel points, and a preset weighted weight conversion relationship; based on the weighted weights of all the neighbourhood pixel points of the target pixel point, perform weighted processing on the different chromaticity values of the pixel points in the YUV image corresponding to each of the neighbourhood pixel points to obtain a denoising result for the target pixel point; wherein the target pixel point is any pixel point in the RGB image.
[0152] The weighted weight conversion relationship configured in the noise reduction module 640 includes:
[0153]
[0154] Among them, (x, y) is the coordinate of the target pixel point, (x+k1, y+k2) represents the coordinate of the neighborhood pixel point of the target pixel point (x, y), and k1∈[-r, r], k2∈[-r1, r2] are the neighborhoods, and r, r1, r2 are preset constants; Score(x+k1, y+k2) represents the confidence of the pixel point with coordinates (x+k1, y+k2); Diff(x, y, k1, k2) is the pixel difference between the pixel point (x+k1, y+k2) and the pixel point (x, y), exp is an exponential operation, W(x, y, k1, k2) represents the weighted weight of the pixel point with coordinates (x+k1, y+k2), and Sigma is a preset constant empirical value.
[0155] The functions implemented by the image processing device for reducing color noise and removing pseudo-color are similar to those of the aforementioned image processing method for reducing color noise and removing pseudo-color. For details, please refer to the aforementioned content and will not be elaborated here.
[0156] Based on the same inventive concept, the embodiment of the present application further provides a processor. The processor includes: a processing unit and a storage unit, the processing unit is connected to the storage unit; the storage unit stores a program, and when the program runs on the processing unit, the image processing method for reducing color noise and removing pseudo-color provided in any of the above embodiments is executed.
[0157] In the embodiments of the present application, the processor may be a data processing core of a GPU (Graphics Processing Unit), a CPU (Central Processing Unit), an AI (Artificial Intelligence), an NPU (Neural Network Processing Unit), an ISP (Image Signal Processor), a DPU (Display Processing Unit), a VPU (Video Processing Unit), etc., or may be a processor chip used in some large-scale data computing scenarios. The above is only an example and should not be a limitation to the present application.
[0158] Based on the same inventive concept, an embodiment of the present application further provides an electronic device, which may include the processor provided by the aforementioned embodiment.
[0159] Based on the same inventive concept, an embodiment of the present application further provides a readable storage medium on which a program is stored. When the program runs on a processing unit, the processing unit executes the image processing method for reducing color noise and removing pseudo-color provided in the above embodiment.
[0160] The readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more available media. The available medium may be a magnetic medium (such as a floppy disk, a hard disk, a tape), an optical medium (such as a DVD), or a semiconductor medium (such as an SSD (Solid State Disk)).
[0161] The technical features of the above embodiments can be freely combined without conflict, and the embodiments obtained by the combination are included in the protection scope of this application.
[0162] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0163] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
Claims
1. An image processing method for reducing color noise and removing pseudo-color, characterized in that: include: Acquire a first format image and a YUV image of the same image to be processed; the first format image and the YUV image are images of two different formats, and pixels in the first format image and pixels in the YUV image correspond to each other; Determine the edge strength corresponding to each pixel in the first format image; the edge strength corresponding to any pixel represents the probability that the pixel is the edge of the image area; Determining the confidence corresponding to each pixel in the YUV image based on the edge strength of each pixel in the first format image; the confidence corresponding to any pixel represents the strength of the pixel participating in filtering and noise reduction; The pixel points of each UV channel in the YUV image are subjected to noise reduction processing based on the confidence level corresponding to each pixel point in the YUV image.
2. The image processing method for reducing color noise and removing pseudo-color according to claim 1, characterized in that: The first format image is an RGB image.
3. The image processing method for reducing color noise and removing pseudo-color according to claim 2, characterized in that: The step of obtaining a first format image and a YUV image of the same image to be processed includes: The pre-acquired YUV image or RGB image is converted based on a preset format conversion relationship between the YUV format and the RGB format to obtain a corresponding RGB image or YUV image.
4. The image processing method for reducing color noise and removing pseudo-color according to claim 2, characterized in that: The determining the edge strength corresponding to each pixel point in the first format image includes: Based on different color component values of each pixel in the RGB image and a preset gradient conversion relationship, the image gradient intensity corresponding to each pixel in the RGB image is determined; the image gradient intensity is used to characterize the edge intensity of the pixel; the gradient conversion relationship includes the conversion relationship between different color component values of the pixel in RGB format and the image gradient intensity.
5. The image processing method for reducing color noise and removing pseudo-color according to claim 4, characterized in that: The gradient conversion relationship includes a first sub-conversion relationship between a red component value, a green component value, a blue component value and a color component gradient intensity, respectively, and a second sub-conversion relationship between the image gradient intensity and the color component gradient intensity of each of the red component value, the green component value, and the blue component value; Determining the image gradient intensity corresponding to each pixel in the RGB image based on different color component values of each pixel in the RGB image and a preset gradient conversion relationship includes: For each pixel point, the color component gradient intensities corresponding to the red component value, the green component value, and the blue component value of the pixel point are calculated using the first sub-conversion relationship; The second sub-conversion relationship is used to sum the color component gradient intensities corresponding to the red component value, the green component value, and the blue component value to obtain the image gradient intensity corresponding to the pixel point.
6. The image processing method for reducing color noise and removing pseudo-color according to claim 5, characterized in that The first sub-conversion relationship includes a conversion relationship between a preset operator and color component gradient intensities corresponding to the red component value, green component value, and blue component value of the pixel point.
7. The image processing method for reducing color noise and removing pseudo-color according to claim 6, characterized in that: The preset operator includes a Kernel operator, the Kernel operator includes KernelHor and KernelVer, and the gradient conversion relationship includes: Gras=Grad r +row g +row b Wherein, R is the red component value of the pixel, G is the green component value of the pixel, B is the blue component value of the pixel, Grad is the image gradient intensity of the pixel, and Grad is the image gradient intensity of the pixel. r is the color component gradient intensity corresponding to the red component value, the Grad g is the color component gradient intensity corresponding to the green component value, the Grad b is the color component gradient intensity corresponding to the blue component value, is the symbol of the convolution operation, the KernelHor and the KernelVer are different preset operators, and as well as 8. The image processing method for reducing color noise and removing pseudo-color according to claim 4, characterized in that: The determining the confidence corresponding to each pixel point in the YUV image based on the edge strength of each pixel point in the first format image includes: For each pixel in the YUV image, the saturation corresponding to the pixel is determined based on different chromaticity values of the pixel and a preset saturation conversion relationship; the saturation conversion relationship includes a conversion relationship between different chromaticity values and saturation; The confidence of the pixel is determined based on the saturation corresponding to the pixel, the image gradient strength of the pixel corresponding to the pixel in the RGB image, and a preset confidence conversion relationship; the confidence conversion relationship includes a conversion relationship between saturation, the image gradient strength, and confidence.
9. The image processing method for reducing color noise and removing pseudo-color according to claim 8, characterized in that: The saturation conversion relationship includes: Sat=abs(U-0.5)+abs(V-0.5) Wherein, the abs is absolute value calculation, the U and the V are respectively values of different chromaticities in the YUV format, and Sat represents confidence.
10. The image processing method for reducing color noise and removing pseudo-color according to claim 8, characterized in that: The confidence conversion relationship includes: Score(x,y)=exp(-(,y)*Sat(x,y) / 1) Among them, the (x, y) represents the coordinates of the pixel point, the Score(x, y) represents the confidence of the pixel point with coordinates (x, y), the exp is an exponential operation, the sigma1 is a preset constant value, the Grad(x, y) represents the image gradient intensity of the pixel point with coordinates (x, y), and the Sat(x, y) represents the saturation of the pixel point with coordinates (x, y).
11. The image processing method for reducing color noise and removing pseudo-color according to any one of claims 2 to 10, characterized in that: The performing noise reduction processing on the pixel points of each UV channel in the YUV image based on the confidence level corresponding to each pixel point in the YUV image includes: For the target pixel in the RGB image: Calculate the pixel difference between the target pixel and its adjacent neighborhood pixels; Obtaining the confidence level corresponding to the neighborhood pixel point; The weighted weight of the neighborhood pixel point is calculated based on the confidence corresponding to the neighborhood pixel point, the pixel difference between the target pixel point and the neighborhood pixel point, and a preset weighted weight conversion relationship; Based on the weighted weights of all the neighboring pixels of the target pixel, weighted processing is performed on different chromaticity values of the pixel points in the YUV image corresponding to each of the neighboring pixels to obtain a color noise reduction result for the target pixel; The target pixel is any pixel in the RGB image.
12. The image processing method for reducing color noise and removing pseudo-color according to claim 10, characterized in that: The weighted weight conversion relationship includes: Wherein, (, y) is the coordinate of the target pixel point, (+k1, y+k2) represents the coordinate of the neighborhood pixel point of the target pixel point (, y), and k1∈[-, r], 2∈[-r1, 2] is the neighborhood, r, r1, r2 are preset constants; Score(x+k1, y+k2) represents the confidence of the pixel point with coordinates (+k1, y+k2); Diff(x, y, k1, k2) is the pixel difference between the pixel point (+k1, y+k2) and the pixel point (, y), exp is an exponential operation, W(x, y, k1, k2) represents the weighted weight of the pixel point with coordinates (+k1, y+k2), and Sigma is a preset constant empirical value.
13. An image processing device for reducing color noise and removing pseudo-color, characterized in that: include: An acquisition module, used for acquiring a first format image and a YUV image of the same image to be processed; the first format image and the YUV image are images of two different formats, and pixels in the first format image and pixels in the YUV image correspond to each other; An edge distinguishing module, used to determine the edge strength corresponding to each pixel in the first format image; the edge strength corresponding to any pixel represents the probability that the pixel is the edge of the image area; A confidence determination module, used to determine the confidence corresponding to each pixel in the YUV image based on the edge strength of each pixel in the first format image; the confidence corresponding to any pixel represents the strength of the pixel participating in filtering and denoising; The denoising module is used to perform denoising processing on the pixel points of each UV channel in the YUV image based on the confidence level corresponding to each pixel point in the YUV image.
14. A processor, characterized in that: include: A processing unit and a storage unit; the storage unit stores a program, and when the program is executed by the processing unit, the processing unit executes the image processing method for reducing color noise and removing pseudo-color according to any one of claims 1 to 12.
15. An electronic device, characterized in that: Comprising a processor as claimed in claim 14.
16. A readable storage medium, characterized in that: The readable storage medium stores a program, and when the program is executed on the processing unit, the processing unit executes the image processing method for reducing color noise and removing pseudo-color according to any one of claims 1 to 12.
Citation Information
Patent Citations
Digital image processing method and device and computer readable storage medium
CN109993706A
Method and system for processing color noise in image, electronic equipment and storage medium
CN111882504A
Image pseudo-color removing method and device
CN118524297A
Denoising method for color image and system thereof
WO2012129897A1
