Image processing method, apparatus and related device

CN122928663APending Publication Date: 2026-10-16PARADIGM PANTHEON (BEIJING) TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610983839.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-02
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0003]本公开提供一种图像处理方法、装置及相关设备,以解决当前图像处理效果不理想的问题

Benefits of technology

[0003] This disclosure provides an image processing method, apparatus, and related equipment to solve the problem of unsatisfactory image processing results in the present.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122928663A_ABST
    Figure CN122928663A_ABST
Patent Text Reader

Abstract

The present disclosure provides an image processing method, device and related equipment, the image processing method comprises: acquiring an input image; identifying a noise region of the input image; determining a first brightness noise region and a second brightness noise region in the noise region, the brightness of the first brightness noise region is lower than a first preset brightness threshold, the brightness of the second brightness noise region is higher than a second preset brightness threshold, the first preset brightness threshold is less than or equal to the second preset brightness threshold; processing the first brightness noise region with a first noise reduction intensity and processing the second brightness noise region with a second noise reduction intensity on the input image to obtain a noise reduction processed image, wherein the first noise reduction intensity is greater than the second noise reduction intensity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the fields of image processing and computer vision technology, and in particular to an image processing method, apparatus and related equipment. Background Technology

[0002] With the continuous development of electronic technology and imaging equipment, various electronic devices with image acquisition capabilities have been widely used in daily life and professional work scenarios. Under poor acquisition conditions such as insufficient light or complex light sources, the acquired images are prone to generating a lot of noise. Current image processing methods typically use noise reduction algorithms to uniformly remove noise from images. This processing method tends to over-smooth out image details such as textures and edges, resulting in unsatisfactory overall image optimization effects. Summary of the Invention

[0003] This disclosure provides an image processing method, apparatus, and related equipment to solve the problem of unsatisfactory image processing results in the present.

[0004] To solve the above problems, this disclosure is implemented as follows:

[0005] In a first aspect, this disclosure provides an image processing method, including:

[0006] Obtain the input image;

[0007] Identify noisy regions in the input image;

[0008] A first brightness noise region and a second brightness noise region are determined in the noise region. The brightness of the first brightness noise region is lower than a first preset brightness threshold, and the brightness of the second brightness noise region is higher than the second preset brightness threshold. The first preset brightness threshold is less than or equal to the second preset brightness threshold.

[0009] For the input image, the first luminance noise region is processed with a first noise reduction intensity, and the second luminance noise region is processed with a second noise reduction intensity to obtain the noise-reduced image; wherein the first noise reduction intensity is greater than the second noise reduction intensity.

[0010] Secondly, this disclosure provides an image processing apparatus, comprising:

[0011] The acquisition module is used to acquire the input image;

[0012] The recognition module is used to identify noise regions in the input image;

[0013] A brightness region determination module is used to determine a first brightness noise region and a second brightness noise region in the noise region. The brightness of the first brightness noise region is lower than a first preset brightness threshold, and the brightness of the second brightness noise region is higher than the second preset brightness threshold. The first preset brightness threshold is less than or equal to the second preset brightness threshold.

[0014] The noise reduction processing module is used to process a first luminance noise region with a first noise reduction intensity and a second luminance noise region with a second noise reduction intensity on the input image to obtain a noise-reduced image; wherein the first noise reduction intensity is greater than the second noise reduction intensity.

[0015] Thirdly, this disclosure also provides an electronic device, including: a memory, a processor, and a program stored in the memory and executable on the processor; the processor is configured to read the program in the memory to implement the steps of the method disclosed in the first aspect above.

[0016] Fourthly, this disclosure also provides a readable storage medium for storing a program that, when executed by a processor, implements the steps of the method disclosed in the first aspect above.

[0017] Fifthly, this disclosure also provides a computer program product, including computer instructions that, when executed by a processor, implement the steps of the method disclosed in the first aspect above. Attached Figure Description

[0018] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings used in the description of the embodiments of this disclosure will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a schematic flowchart of the image processing method provided in the embodiments of this disclosure;

[0020] Figure 2 This is a flowchart illustrating the specific implementation of step 200 of the image processing method provided in this embodiment.

[0021] Figure 3 This is a flowchart illustrating the specific implementation of step 800 of the image processing method provided in this embodiment.

[0022] Figure 4 This is one of the specific implementation flowcharts of step 230 of the image processing method provided in this embodiment of the present disclosure;

[0023] Figure 5 This is the second flowchart illustrating the specific implementation of step 230 of the image processing method provided in this embodiment.

[0024] Figure 6 This is a flowchart illustrating the specific implementation of step 210 of the image processing method provided in this embodiment.

[0025] Figure 7 This is a schematic flowchart of the tone correction image generation method provided in the embodiments of this disclosure;

[0026] Figure 8 This is a schematic flowchart of the contrast-corrected image generation method provided in the embodiments of this disclosure;

[0027] Figure 9 This is a schematic flowchart of the corrected image generation method provided in the embodiments of this disclosure;

[0028] Figure 10 This is a visual schematic diagram of the algorithm curve corresponding to the embodiment of this disclosure;

[0029] Figure 11 This is a schematic diagram of the structure of an image processing apparatus provided in an embodiment of this disclosure;

[0030] Figure 12 This is a schematic diagram of the structure of a tone correction image generation device provided in an embodiment of this disclosure;

[0031] Figure 13 This is a schematic diagram of the structure of a contrast-corrected image generation device provided in an embodiment of this disclosure;

[0032] Figure 14 This is a schematic diagram of the structure of a corrected image generation device provided in an embodiment of this disclosure;

[0033] Figure 15 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0034] The technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this disclosure. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.

[0035] The terms "first," "second," etc., used in the embodiments of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or devices. Additionally, the use of "and / or" in this disclosure indicates at least one of the connected objects, such as A and / or B and / or C, representing seven possibilities: including A alone, B alone, C alone, and the presence of both A and B, both B and C, both A and C, and the presence of A, B, and C.

[0036] Please see Figure 1 , Figure 1 This is a schematic flowchart of the image processing method provided in the embodiments of this disclosure. Figure 1 The image processing method shown can be executed by an electronic device. Specifically, it can be implemented in a central processing unit (CPU), field programmable gate array (FPGA), digital signal processor (DSP), or dedicated image signal processor (ISP) chip of the electronic device, and the ISP chip can be an application-specific integrated circuit (ASIC) chip.

[0037] like Figure 1 As shown, the image processing method may include the following steps:

[0038] Step 200: Obtain the input image.

[0039] The method of acquiring the input image is not limited here. Optionally, the input image can be an image captured by the electronic device through a camera; alternatively, the input image can be an image obtained by the electronic device from a server; and even more alternatively, the input image can be an image sent by other electronic devices to the electronic device in this embodiment of the disclosure.

[0040] Optionally, the input image can be the original image, which can be understood as an unprocessed image. Alternatively, the input image can also be an image that has undergone exposure correction processing.

[0041] Furthermore, the application scenarios of the embodiments disclosed herein are not limited. Optionally, the application scenarios of the embodiments disclosed herein may include at least one of the following: smartphone photography, video conferencing and live streaming, medical image enhancement, document scanning and optical character recognition (OCR) preprocessing, smart glasses, embedded and edge-side intelligent vision systems in computing-constrained scenarios, etc. Among these, the embedded and edge-side intelligent vision systems in computing-constrained scenarios may include at least one of the following: vehicle-mounted visual perception and advanced driver assistance systems, intelligent security monitoring edge devices, etc.

[0042] Step 400: Identify the noise region of the input image.

[0043] The specific method for identifying noise regions in the input image is not limited here. Optionally, the input image can be input into a pre-trained noise region identification model for identification to output the noise regions of the input image. Alternatively, the input image can be processed by filtering techniques to filter and distinguish noise regions, and the aforementioned noise regions can also be referred to as the noise difference layer in the input image.

[0044] Step 600: Determine the first brightness noise region and the second brightness noise region in the noise region. The brightness of the first brightness noise region is lower than the first preset brightness threshold, and the brightness of the second brightness noise region is higher than the second preset brightness threshold. The first preset brightness threshold is less than or equal to the second preset brightness threshold.

[0045] Wherein, since the brightness of the first brightness noise region is lower than the first preset brightness threshold, the first brightness noise region can be called the dark region; since the brightness of the second brightness noise region is higher than the second preset brightness threshold, the second brightness noise region can be called the bright region.

[0046] Step 800: For the input image, process the first luminance noise region with a first noise reduction intensity and process the second luminance noise region with a second noise reduction intensity to obtain the noise-reduced image; wherein the first noise reduction intensity is greater than the second noise reduction intensity.

[0047] Since the first brightness noise region is a dark region with low brightness, and the signal-to-noise ratio is poor in dark regions, the visual interference of noise is more obvious. Moreover, the human eye has low sensitivity to the details of low brightness regions. Therefore, the first brightness noise region can be denoised with a higher noise reduction intensity to ensure that noise in dark regions is fully filtered out. Since the second brightness noise region is a bright region with high brightness, and the bright region has more details, and the human eye is sensitive to changes in details in bright regions and has a relatively high tolerance for noise in bright regions, the second brightness noise region can be denoised with a lower noise reduction intensity to gently suppress noise in bright regions while preserving as much detail as possible.

[0048] It should be noted that, optionally, the input image is processed with a first noise reduction intensity to process a first luminance noise region and with a second noise reduction intensity to process a second luminance noise region, resulting in a noise-reduced image. This can be understood as follows: the input image is divided into a first luminance noise region and a second luminance noise region according to a preset luminance threshold, wherein the preset luminance threshold is a fixed value set according to user requirements. The first luminance noise region is processed with the first noise reduction intensity to obtain a first image; the second luminance noise region is processed with the second noise reduction intensity in parallel or serially to obtain a second image; then the first image and the second image are fused to obtain the noise-reduced image.

[0049] Alternatively, the first image and the second image can be weighted and fused to obtain the denoised image. The weights of the first image and the second image can be determined as follows: the weights of the first image and the second image can be determined based on the gradient weight values, or the weights of the first image and the second image can be predicted by a lightweight convolutional neural network (CNN).

[0050] Another optional implementation is as follows: The input image is divided into a first brightness noise region, a second brightness noise region, and a third brightness region according to a preset brightness threshold, wherein the third brightness region is a region that does not require noise reduction processing. The brightness threshold includes a high brightness threshold and a low brightness threshold, with the high brightness threshold being greater than the low brightness threshold. The first brightness noise region is processed with a first noise reduction intensity to obtain a first image. The second brightness noise region is processed with a second noise reduction intensity in parallel or serially to obtain a second image. The first image, the second image, and the original images corresponding to the third brightness region are fused to obtain the noise-reduced image.

[0051] Another optional implementation is as follows: For the input image, the input image is divided into multiple brightness regions according to multiple preset brightness thresholds, and different intensity of noise reduction processing is performed on different regions. This may include regions that do not need to be denoised. After performing noise reduction processing of corresponding intensity on each region in parallel or serially, the resulting multiple local processed images are fused to obtain the noise-reduced image.

[0052] In this embodiment, steps 200 to 800 distinguish different brightness noise regions and implement differentiated noise reduction. A high-intensity noise reduction is applied to the first brightness noise region, effectively filtering out significant noise in dark areas and greatly improving image noise suppression. A low-intensity noise reduction is applied to the second brightness noise region, preserving as much of the rich texture and edge details in bright areas as possible, while also achieving moderate smoothing and suppression of noise in bright areas. By matching differentiated noise reduction intensities to the two types of brightness noise regions, image noise reduction is effectively achieved while sufficiently removing image noise, avoiding excessive blurring of details caused by globally uniform noise reduction. This balances noise reduction effectiveness with complete image detail restoration, resulting in a significant improvement in image quality.

[0053] It should be noted that in this embodiment of the disclosure, the first luminance noise region and the second luminance noise region are determined by evaluating the noise region according to its luminance. Then, the first luminance noise region and the second luminance noise region are processed with different denoising intensities, which increases the diversity and flexibility of the denoising processing method for the input image.

[0054] It should be noted that, optionally, denoising the first and second luminance noise regions can be performed on isolated noise points within these regions. The source of these isolated noise points is not limited here. For example, isolated noise points could be amplified noise points within the input image after exposure correction; or, for example, they could be stubborn impulse noise points that are difficult to remove using traditional denoising methods. Since these isolated noise points are scattered, a uniform, strong denoising approach across the entire region could easily mistakenly remove non-noise content from the input image. This embodiment employs a differentiated denoising strategy for different regions, applying high-intensity denoising to dark areas to effectively remove isolated noise points, and using low-intensity denoising to bright areas to avoid over-smoothing of effective non-noise information such as text and fine textures. The specific content of these non-noise contents is not limited here; for example, they could include black text on a white background, fine outline textures, etc.

[0055] As an optional implementation method, see [link to implementation details]. Figure 2 Step 200, the step of identifying noise regions in the input image, includes:

[0056] Step 210: Perform preliminary noise identification on the input image to obtain a preliminary noise map;

[0057] The initial screening noise map may include multiple initial screening noise points, which can be understood as scattered noise points with small volume.

[0058] It should be noted that the specific method for performing preliminary noise identification on the input image to obtain the initial noise map is not limited here. Optionally, multiple feature points that meet the initial noise criteria can be obtained by traversing each feature point in the input image, and these multiple feature points can be combined to form the initial noise map.

[0059] Alternatively, the input image can be fed into a pre-trained noise recognition model for identification, thereby outputting a preliminary noise map.

[0060] Step 220: Perform morphological dilation processing on the initial screening noise points in the initial screening noise point image to aggregate them into a noise patch image;

[0061] In this process, morphological dilation is performed on the initial screening noise points in the initial screening noise map to aggregate them into a noise patch map. This can be understood as follows: since the initial screening noise points are usually scattered and small in size, and there are usually multiple initial screening noise points, morphological dilation can be performed on these multiple initial screening noise points to connect them into more easily identifiable noise patches to obtain a noise patch map. This makes the outline of the noise patches in the obtained noise patch map clearer and makes it easier to accurately determine the outline parameters and / or neighborhood occupancy of the noise patches in the subsequent process.

[0062] Step 230: Based on the noise patch map, determine the contour parameters and / or neighborhood occupancy of each noise patch; wherein, the contour parameters include at least one of the following: contour area, contour aspect ratio, and neighborhood occupancy indicates the density of the noise patch distribution in the corresponding neighborhood.

[0063] Step 240: Remove noise patches that do not meet the screening criteria; the screening criteria include at least one of the following: the outline area is less than the preset area threshold, the outline aspect ratio is less than the preset aspect ratio threshold, and the neighborhood occupancy rate is less than the preset occupancy rate threshold.

[0064] Among them, when a noise patch meets the screening conditions, that is, when a noise patch meets at least one of the following conditions: the outline area is less than a preset area threshold, the outline aspect ratio is less than a preset aspect ratio threshold, and the neighborhood occupancy rate is less than a preset occupancy rate threshold, then the noise patch is more likely to be a real noise point. This is because real noise points are usually isolated small points with a small area and a small aspect ratio. At the same time, real noise points are usually randomly distributed, so their neighborhood occupancy rate will be less than the preset occupancy rate threshold.

[0065] Correspondingly, when the aspect ratio of a noise patch is greater than or equal to a preset aspect ratio threshold, the noise patch is more likely to be a line feature, because line features are usually thin and long with a large aspect ratio. The aforementioned line features can include table lines, outlines, etc. When the outline area of ​​a noise patch is greater than or equal to a preset area threshold, it indicates that the area of ​​the noise patch is large, and it is more likely to be an image. When the neighborhood occupancy rate of a noise patch is greater than or equal to a preset occupancy rate threshold, it indicates that the pixel occupancy rate of the noise patch in the neighborhood is relatively high, and it is usually more likely to be text or numbers with clear stroke structures.

[0066] Step 250: Determine the image region corresponding to the noise patch that is retained after removal as the noise region of the input image.

[0067] In this embodiment, based on the noise patch map, the contour parameters and / or neighborhood occupancy rate of each noise patch are determined. Then, noise patches that do not meet the criteria for real noise are removed, and the image regions corresponding to the retained noise patches are defined as the noise regions of the input image. In this way, through a morphological feature discrimination mechanism, small, valid objects can be distinguished from real noise, avoiding the incorrect retention of small objects such as text and leaves as noise. Simultaneously, it reduces the removal of real noise, effectively lowering the misjudgment and incorrect removal rate of noise patches and improving the accuracy of the determined noise regions.

[0068] As an optional implementation method, see [link to implementation details]. Figure 3 Step 800, the step of processing the first luminance noise region with a first noise reduction intensity and the second luminance noise region with a second noise reduction intensity to obtain the noise-reduced image, includes:

[0069] Step 810: Determine the first noise reduction intensity and the second noise reduction intensity based on the preset contour parameter threshold and / or neighborhood occupancy threshold;

[0070] Step 820: Process the first luminance noise region with a first noise reduction intensity and process the second luminance noise region with a second noise reduction intensity to obtain the noise-reduced image.

[0071] It should be noted that the specific method for determining the first and second noise reduction intensities based on preset contour parameter thresholds and / or neighborhood occupancy thresholds is not limited here. For example, the larger the contour parameter threshold and neighborhood occupancy threshold are set, the higher the required noise reduction intensity for the corresponding region. Due to the characteristics of dark area imaging, the contour parameters and neighborhood occupancy of noise patches in the first brightness noise region are generally higher than those in the second brightness noise region. The statistical dimension is not limited to the mean of noise patches within the region; it can also be determined using the maximum value, median, cumulative percentage, or a weighted average of the number of noise patches. For example, the maximum value of the contour parameters and neighborhood occupancy of noise patches within the region can be extracted, or the median of all patch data can be taken. Alternatively, the number of noise patches exceeding the basic threshold can be counted, and a comprehensive index can be calculated by weighting the number of patches. Regardless of the statistical method used, the comprehensive index obtained from the statistics of the first brightness noise region is higher than that of the second brightness noise region; therefore, the final calculated first noise reduction intensity is greater than the second noise reduction intensity.

[0072] In this embodiment of the disclosure, a first noise reduction intensity and a second noise reduction intensity are determined based on a preset contour parameter threshold and / or a neighborhood occupancy threshold, thereby improving the accuracy of the determined first noise reduction intensity and second noise reduction intensity, and further enhancing the accuracy of noise reduction processing for the first luminance noise region and the second luminance noise region.

[0073] It should be noted that, optionally, the specific method for determining the contour parameters and / or neighborhood occupancy of each noise patch is not limited here. Optionally, the contour parameters and / or neighborhood occupancy of each noise patch can be determined by obtaining at least one of the Fourier Descriptors, Hu Moments (Hu), or Convex Hull of each noise patch, and by using at least one of the Fourier Descriptors, Hu Moments (Hu), or Convex Hull.

[0074] As an optional implementation method, see [link to implementation details]. Figure 4 Step 230, determining the contour parameters and / or neighborhood occupancy of each noise patch based on the noise patch map, includes:

[0075] Step 231a: Use the moment characteristics of the noise patch to fit and obtain the equivalent ellipse of the noise patch;

[0076] The specific type of moment feature of the noise patch is not limited here. Optionally, the moment feature of the noise patch may include the image moment of the noise patch.

[0077] Step 232a: Based on the eigenvalues ​​of the equivalent ellipse, determine the aspect ratio of the corresponding noise patch as the contour parameter of the corresponding noise patch.

[0078] In this process, the aspect ratio of the corresponding noise patch is determined based on the eigenvalues ​​of the equivalent ellipse. The specific method of using this as the outline parameter of the corresponding noise patch is not limited here. Optionally, multiple eigenvalues ​​can be obtained equivalently, and then the aspect ratio of the corresponding noise patch can be calculated based on the ratio of the multiple eigenvalues. The aspect ratio of the corresponding noise patch is then determined as the outline parameter of the corresponding noise patch.

[0079] In this embodiment, by refining the contour parameter extraction process based on image moments, second-order central moments, and equivalent ellipses, the shape, size, and stretching characteristics of noise patches can be accurately characterized. This effectively avoids the shortcomings of simple bounding box methods, which are susceptible to noise spikes and irregular edges, significantly improving the calculation accuracy of contour parameters. Relying on high-precision contour parameters, it is possible to more reliably distinguish between point-like real noise and effective image content such as thin lines and large-area textures, reducing the false positives and false negatives of noise patches. This provides accurate data support for subsequent matching of differentiated noise reduction intensities, further improving the overall image processing effect.

[0080] For example, the second-order central moments of a connected component can be calculated using the moment features of noise patches (such as image moments), and then the equivalent ellipse can be obtained based on the second-order central moments of the connected component. Furthermore, the eigenvalues ​​of the equivalent ellipse can be used to determine its equivalent ellipse. , ( , Corresponding to the eigenvalues ​​of the semi-major axis of the ellipse, Based on the eigenvalues ​​of the minor semi-axis of the ellipse, the aspect ratio of the corresponding noise patch is determined. This aspect ratio can also be referred to as the aspect ratio R. Optionally, the formula for calculating R can be found below: .

[0081] As an optional implementation method, see [link to implementation details]. Figure 5 Step 230, determining the contour parameters and / or neighborhood occupancy of each noise patch based on the noise patch map, includes:

[0082] Step 231b: Binarize the initial screening noise image to obtain the initial screening noise mask;

[0083] Step 232b: Calculate the initial noise mask using a preset circular convolution kernel to obtain the duty cycle response map;

[0084] Step 233b: Extract the duty cycle values ​​corresponding to the positions of each noise patch in the duty cycle response map;

[0085] Step 234b: Use the duty cycle value as the neighborhood occupancy rate of the corresponding noise patch.

[0086] The preset circular convolution kernel can be a normalized circular convolution kernel, and the sum of the weight coefficients of all pixels in the normalized circular convolution kernel is equal to 1. In this way, the duty cycle value in the obtained duty cycle response map can be between 0 and 1, which can directly represent the percentage of noise pixels in the local area.

[0087] For example: a pre-defined circular convolution kernel can be used This indicates that the duty cycle response diagram can be used. express, The calculation formula can be found in the following formula: ;in, Used to represent the initial screening noise mask, that is, the result of binarization of the initial screening noise image.

[0088] The closer the duty cycle value is to 0, the more open the area around the noise patch corresponding to that duty cycle value is, and therefore the greater the probability that the noise patch is random noise. Random noise can include thermal noise or particle noise. The closer the duty cycle value is to 1, the more likely that the noise patch corresponding to that duty cycle value is in a dense group, that is, the noise patch is more likely to be on the edge of an object, in a complex fabric texture or in the lines of text. In other words, the probability that the noise patch is not noise is higher.

[0089] In this embodiment, the local duty cycle value obtained by convolution is used as the neighborhood occupancy rate of the noise patch, and the distinction between real and false noise is completed based on this neighborhood occupancy rate. Compared with the method of judging noise solely based on single morphological features such as patch size and aspect ratio, this scheme introduces the density of pixel distribution around the patch as the discrimination criterion, which can effectively distinguish between isolated random noise and dense and continuous effective image content such as text, texture, and contour lines. This significantly reduces the probability of effective foreground being misjudged as noise and discrete real noise being missed, significantly improving the accuracy of noise region recognition and providing a reliable judgment basis for subsequent differentiated noise reduction by region.

[0090] It should be noted that the above Figure 4 The embodiments shown and Figure 5 The implementation methods shown can be carried out in one of two ways, or, as described above Figure 4 The embodiments shown and Figure 5 The implementation methods shown can also be implemented simultaneously, and specific implementations are not limited here.

[0091] As an optional implementation method, see [link to implementation details]. Figure 6 Step 210, the step of performing preliminary noise identification on the input image to obtain a preliminary noise map, includes:

[0092] Step 211: Perform median filtering on the input image to obtain the low-frequency region;

[0093] Among them, median filtering can remove high-frequency details and impulse noise from the input image, retaining only the large-area, gently changing low-frequency features of the input image. These low-frequency features can be understood as features within the low-frequency region.

[0094] It should be noted that, optionally, the median filtering process described above can also be replaced by bilateral filtering, guided filtering, or non-local means filtering, etc., to increase the diversity and flexibility of low-frequency region acquisition methods and improve the algorithm's adaptability to different image scenarios.

[0095] Step 212: Remove the low-frequency regions from the input image to obtain the high-frequency regions;

[0096] Optionally, the input image can be differentially analyzed with the low-frequency region to remove the low-frequency region and obtain the high-frequency region.

[0097] The high-frequency region can include high-frequency features in the input image, and high-frequency features can typically include at least one of the following features: noise points, edges, text, lines, and other features with a relatively drastic degree of change.

[0098] Step 213: Identify and retain pixels in the high-frequency region whose pixel values ​​are lower than the preset pixel threshold to obtain the initial noise map.

[0099] Among them, pixels with pixel values ​​lower than the preset pixel threshold can be understood as noise whose original pixel grayscale is low. After median filtering, the corresponding pixel in the low-frequency region is smoothly raised by the surrounding background. After the original image and the low-frequency region are subtracted, the noise location forms a low-amplitude pixel in the high-frequency region. Such low-amplitude pixels are candidate noise to be retained, such as isolated grain noise in dark areas and thermal noise.

[0100] In this embodiment, by removing low-frequency regions from the input image to obtain high-frequency regions, and identifying and retaining pixels in the high-frequency regions whose pixel values ​​are lower than a preset pixel threshold, a preliminary noise image is obtained. In this way, the interference of low-frequency features such as large areas of smooth textures and background colors on the noise preliminary screening process can be completely isolated, avoiding large backgrounds and smooth color blocks from being mistakenly included in the candidate noise. Noise coarse extraction is only performed in high-frequency regions containing noise, edges, and lines, which greatly reduces false detections caused by invalid pixels and significantly improves the pixel recognition accuracy of the preliminary noise image, providing a reliable foundation for subsequent noise patch extraction and real and fake noise discrimination.

[0101] As an optional implementation method, see [link to implementation details]. Figure 7 This disclosure also provides a method for generating a tone-corrected image, comprising:

[0102] Step 1000a: Calculate the hue weight based on the adjustable hue value range. The hue weight is used to limit the range of hues involved in hue adjustment.

[0103] Step 1200a: Generate a skin color mask based on the tonal range corresponding to the skin color of the portrait. The skin color mask is used to suppress tonal adjustments in the skin color area.

[0104] The method of generating the skin color mask is not limited here. Optionally, the skin color mask can be generated by dividing the skin color area in the noise-reduced image under the HueSaturation Value (HSV) color space; alternatively, an elliptical skin color model in the Luminance-Chrominance Blue-Chrominance Red (YCbCr) color space can be used to divide the skin color area by combining the luminance Y, blue Cb, and red Cr components; alternatively, a face detection algorithm can be used to locate the rectangular area of ​​the face and generate the skin color mask based on the rectangular area.

[0105] Step 1400a: Generate saturation weights based on preset saturation thresholds. The saturation weights are used to filter adjustable pixels that meet the saturation conditions.

[0106] Step 1600a: Generate brightness weights based on preset brightness thresholds. The brightness weights are used to filter adjustable pixels that meet the brightness conditions.

[0107] Step 1800a: Combine hue weights, skin color mask, saturation weights, and brightness weights to obtain hue adjustment weights;

[0108] Step 2000a: Perform tone correction on the noise-reduced image according to the tone adjustment weight and the preset tone offset to obtain the tone-corrected image.

[0109] In this embodiment, a refined tone adjustment weight is obtained by fusing hue weight, saturation weight, brightness weight, and skin tone mask. Then, based on this tone adjustment weight and a preset tone offset, differential tone correction is performed pixel-by-pixel on the denoised image to generate a tone-corrected image. The skin tone mask significantly attenuates the adjustment weight corresponding to the skin tone region of the portrait, suppressing the tone offset of face and skin pixels. Only background pixels that simultaneously meet the hue, saturation, and brightness thresholds are subject to a complete tone offset. This allows for targeted correction of tone deviations in the background region, such as uniformly correcting a yellowish-green background to standard green and a bluish background to standard blue, thus achieving background color uniformity optimization. Furthermore, while accurately correcting background color cast and unifying the visual appearance of the background tone, the entire process avoids interference from the color correction algorithm on the portrait's skin tone, effectively preserving the color fidelity of the original skin tone and preventing distortion problems such as yellowing, greening, or bluish discoloration of the face. Pixel-level regional color correction is achieved through multi-dimensional weight joint constraints, balancing background color correction needs with the protection of the portrait's skin tone, significantly improving the overall visual naturalness and image quality of the final tone-corrected image.

[0110] The tone-corrected image generation method in this embodiment can be executed after step 800, where the input image is processed with a first noise reduction intensity to process a first luminance noise region and with a second noise reduction intensity to process a second luminance noise region, thereby obtaining a noise-reduced image.

[0111] It should be noted that, optionally, step 2000a, performing tone correction on the noise-reduced image based on the tone adjustment weight and a preset tone offset, to obtain a tone-corrected image, includes:

[0112] The denoised image is mapped to the Hue Saturation Value (HSV) space;

[0113] The image after noise reduction in HSV space is toned according to the tonal adjustment weight and the preset tonal offset to obtain a toned-corrected image.

[0114] In this way, by only modifying the hue (H) channel value, while keeping the saturation (S) and brightness (V) channels unchanged from their original pixel values, interference with the image's saturation and brightness levels can be significantly reduced throughout the entire hue correction process, further optimizing the visual display effect of the hue-corrected image.

[0115] For example: Hue weighting can be adopted It means, and The calculation formula can be found below:

[0116] ;

[0117] in, `truncation` is a region cutoff function used to constrain input values ​​to the interval [0,1]; `H` represents the hue value corresponding to the H channel in the HSV space; the above formula defines an approximately trapezoidal response window, with weights adjusted only when the hue value falls within the interval [25,110]. If the value is greater than 0, this range mainly covers yellow, yellow-green, cyan, and blue background hues, and only pixels within this range will participate in hue shift adjustment.

[0118] Among them, skin color mask can be used This indicates that the skin color mask can be obtained from the initial skin color mask. Optionally, the initial skin color mask can be obtained using... It means that by extracting The corresponding orange hue values ​​(i.e., hue values ​​located in [0,40,40]-[25,255,255]) and red hue values ​​([160,40,40]-[180,255,255]) in the HSV color space are used as binary masks. These binary masks are then subjected to a large-radius Gaussian blur to generate a skin tone mask. .

[0119] The saturation weight can be adopted as follows: This indicates that brightness weighting can be adopted. This indicates that the weight of the hue adjustment can be adopted. The specific calculation formula can be found below:

[0120] ;

[0121] It should be noted that the tone correction of the image after noise reduction is performed based on the tone adjustment weight and the preset tone offset. The specific method of obtaining the tone-corrected image is not limited here. Optionally, the preset tone offset is multiplied by the tone adjustment weight to obtain the hue offset increment corresponding to each pixel, and then the tone of the image after noise reduction is adjusted based on the hue offset increment to obtain the tone-corrected image.

[0122] For example, the method for obtaining a tone-corrected image described above can be summarized by the following calculation formula:

[0123] ;

[0124] in, H represents the hue of the pixel-corrected image in the tone-corrected image, i.e., the hue in the tone-corrected image, while H represents the original hue in the image after noise reduction. Used to indicate the preset hue offset. It is used to represent the hue offset increment of a single pixel, and mod 180 is used to represent the logarithmic value divided by 180 and modulo.

[0125] This disclosed embodiment performs pixel-level weighted scaling of the global hue offset by adjusting the hue adjustment weights, and completes hue correction by combining modulo operations. On the one hand, relying on the attenuation term generated by the skin color mask, it can smoothly reduce the color adjustment amplitude of the skin color area of ​​the portrait, and apply the complete hue offset only to the background pixels that meet the hue, saturation, and brightness selection conditions. While uniformly correcting the yellow-green and cyan-blue color casts in the background, it avoids distorted color casts in the skin color of the face and body, and retains the true appearance of the original skin color. On the other hand, it only adjusts the H channel value in the hue, saturation, and brightness color space, without changing the saturation and brightness components throughout, so as not to destroy the brightness and darkness levels and color vividness of the original image. At the same time, it uses modulo operations to deal with the problem of hue value overflow, automatically realizes the cyclic mapping of the hue ring interval, eliminates color banding and noise problems at the hue boundary, and ultimately significantly improves the naturalness and overall visual quality of the hue-corrected image.

[0126] It should be noted that if global contrast stretching is directly applied to the denoised image, it can easily lead to a decrease in the brightness of dark areas and an increase in the brightness of bright areas, resulting in overly dark dark areas and overly bright bright areas. To solve this technical problem, the following embodiments are proposed.

[0127] See Figure 8 This disclosure also provides a method for generating a contrast-corrected image, comprising:

[0128] Step 1000b: Process the denoised image using a linear histogram stretching algorithm to generate a global contrast image;

[0129] Step 1200b: Construct an inverse luminance base mask based on the luminance value of each pixel in the denoised image;

[0130] Step 1400b: Based on the pixel brightness distribution pattern in the image after noise reduction, determine the shadow protection weight and highlight protection weight respectively;

[0131] Step 1600b: Combine the inverse luminance base mask, shadow protection weights, and highlight protection weights to obtain the combined luminance mask;

[0132] Step 1800b: Based on the fused luminance mask, the denoised image and the global contrast image are weighted and fused to obtain the contrast-corrected image.

[0133] In this embodiment, the denoised image can be processed using a linear histogram stretching algorithm to generate a global contrast image. Then, based on the brightness value of each pixel in the denoised image, an inverse brightness base mask is constructed. According to the pixel brightness distribution pattern in the denoised image, shadow protection weights and highlight protection weights are determined respectively. The inverse brightness base mask, shadow protection weights, and highlight protection weights are then fused to obtain a fused brightness mask. Finally, based on the fused brightness mask, the denoised image and the global contrast image are weighted and fused to obtain a contrast-corrected image. In this way, the shadow protection weights and highlight protection weights constrain the bright and dark areas, significantly increasing the proportion of the denoised original image during fusion calculation, effectively preserving the texture details of the shadow and highlight areas, and avoiding the loss of shadow information and highlight overexposure caused by global stretching. Simultaneously, the inverse brightness base mask is used to control the gain in the middle grayscale range of the image, fully introducing the contrast enhancement effect of the global contrast image into the transition areas that are neither shadow nor highlight, strengthening the image's layering and transparency, thereby further enhancing the display effect of the obtained contrast-corrected image. In other words, the embodiments of this disclosure not only improve the overall clarity of the contrast-corrected image, but also dynamically suppress the overflow of highlight details (i.e., details in the bright area) and the loss of details in the dark area caused by the contrast enhancement.

[0134] The contrast-corrected image generation method in this embodiment can be executed after step 800, where the input image is processed with a first noise reduction intensity to process a first luminance noise region and a second noise reduction intensity to process a second luminance noise region, resulting in a denoised image. At this time, steps 1000b to 1800b are performed on the denoised image.

[0135] The contrast-corrected image generation method in this embodiment can be performed after step 2000a, in which the image after noise reduction is corrected according to the tone adjustment weight and the preset tone offset, to obtain the tone-corrected image. At this time, steps 1000b to 1800b are performed on the tone-corrected image.

[0136] For example: global contrast images can be used Indicates; the inverse luminance base mask can be used It means, and Where L represents the luminance value of the L channel of a pixel, with a value range of 0-255; the dark area protection weight can be adopted. It means, and Highlight protection weights can be adopted. It means, and The fusion of the luma mask can be achieved using... It means, and Here, clip is a range cutoff function that constrains the result to the range [0,1].

[0137] It should be noted that the specific method for obtaining the contrast-corrected image by weighted fusion of the denoised image and the global contrast image based on the fused luminance mask can be found in the following calculation formula:

[0138] ;

[0139] in, Used to represent contrast-corrected images. Used to represent the image after noise reduction processing. Used to represent a global contrast image obtained by stretching a linear histogram. Used to represent the blended brightness mask, and the above and This can be understood as two weighting coefficients.

[0140] See Figure 9 This disclosure also provides a method for generating a corrected image, including:

[0141] Step 1000c: Process the original saturation of each pixel in the noise-reduced image based on preset coefficients to obtain the initial adjusted saturation of each pixel;

[0142] Step 1200c: Based on the original saturation of each pixel, construct the S-shaped transition adjustment weight for each pixel;

[0143] Step 1400c: Adjust the weights according to the S-shaped transition, and then perform a weighted fusion of the original saturation and the initial adjusted saturation of each pixel to obtain the mixed saturation of each pixel.

[0144] Step 1600c: Determine whether the blend saturation of each pixel is greater than the preset saturation compression knee threshold.

[0145] Step 1800c: If so, perform hyperbolic tangent compression on the mixed saturation to obtain the target saturation of the corresponding pixel;

[0146] Step 2000c: If not, use the blended saturation as the target saturation for the corresponding pixel;

[0147] Step 2200c: Obtain the corrected image based on the target saturation of each pixel.

[0148] In this embodiment, saturation optimization is performed in layers: First, saturation is increased by a preset coefficient to enhance the overall color vibrancy of the image; then, an S-shaped transition adjustment weight is used to weightedly blend the original and stretched saturation, moderately enhancing low-saturation areas and smoothly transitioning between high and low saturation ranges to eliminate the color disjointness caused by abrupt saturation changes; finally, a saturation compression knee threshold is set, applying hyperbolic tangent nonlinear compression only to ultra-high saturation pixels to gently suppress color overflow and glaring issues in high-saturation areas, avoiding color block distortion caused by hard truncation. This embodiment balances color richness and naturalness, enhancing the image's clarity and vibrancy while suppressing color overflow distortion in ultra-high saturation areas, effectively improving the visual display effect of the final corrected image.

[0149] The corrected image generation method in this embodiment can be executed after step 800, which involves processing the first luminance noise region of the input image with a first noise reduction intensity and processing the second luminance noise region with a second noise reduction intensity to obtain a denoised image. At this time, steps 1000c to 2200c are performed on the denoised image.

[0150] The corrected image generation method in this embodiment can be performed after step 2000a, in which the image after noise reduction is corrected according to the tone adjustment weight and the preset tone offset, to obtain the tone-corrected image. At this time, steps 1000c to 2200c are performed on the tone-corrected image.

[0151] The contrast-corrected image generation method in this embodiment can be performed after step 1800b, where a weighted fusion of the denoised image and the global contrast image is performed based on a fused luminance mask to obtain a contrast-corrected image. At this time, steps 1000c to 2200c are then performed on the contrast-corrected image.

[0152] For example: the original saturation of each pixel in the denoised image can be achieved using... Indicates; preset coefficients can be used This indicates that the initial saturation adjustment can be achieved using... It means, and The calculation formula can be found below: ;

[0153] Among them, the S-shaped transition adjustment weight can be adopted. It means, that is This can be understood as weights constructed based on a Sigmoid-type S-curve (S-Curve), while The calculation formula can be found below:

[0154] ;

[0155] Among them, pivot is used to represent the inflection point of the S-curve and to divide the pixel range into low saturation and medium-high saturation. The value is used to represent the steepness of the S-curve and to control the rate of change in the transition between high and low saturation regions; 'e' represents the natural constant. These settings allow the saturation of pixels in low-saturation regions of the denoised image to remain linear or slightly increased, while the saturation of pixels in medium-to-high saturation regions of the denoised image is significantly improved.

[0156] Among them, the mixing saturation can be adopted It means, and The calculation formula can be found below:

[0157] ;

[0158] The preset saturation compression knee threshold can be understood as the value of the knee point (Knee), and the target saturation can be achieved using... This means that the calculation method determines whether the blend saturation of each pixel is greater than a preset saturation compression knee threshold. If so, hyperbolic tangent compression is performed on the blend saturation to obtain the target saturation of the corresponding pixel. If not, the blend saturation is used as the target saturation of the corresponding pixel, which can be summarized by the following formula:

[0159] ;

[0160] Where Tanh is the hyperbolic tangent function, which gradually suppresses the high saturation area to ensure a smooth and natural color transition; the value 255 represents the maximum value of the 8-bit image saturation channel. This formula can gently constrain ultra-high saturation pixels within the range of [Knee, 255) to avoid directly truncating high saturation values ​​and causing harsh color banding and color distortion.

[0161] It should be noted that, optionally, the above-mentioned S-curve and hyperbolic tangent compression processing Tanh can be replaced by a 3D lookup table (3D LUT) to reduce the computational overhead of the algorithm.

[0162] In this embodiment, saturation is first increased using a fixed coefficient. A smooth transition between high and low saturation ranges is achieved using Sigmoid S-shaped weights, moderately brightening low-saturation areas and enhancing vibrancy in medium-to-high saturation areas to eliminate color fragmentation caused by abrupt saturation changes. Then, a saturation knee threshold is set, applying a hyperbolic tangent function for gentle non-linear compression only to ultra-high saturation pixels. This suppresses high-saturation overflow and glaring color distortion, balancing color richness and natural color transitions. Simultaneously, 3D LUT lookup is supported for acceleration, balancing imaging quality and algorithm efficiency.

[0163] For a more complete explanation of the above embodiments, see [link to relevant documentation]. Figure 10 , Figure 10 This is a visual diagram of the algorithm curve corresponding to the embodiment of this disclosure.

[0164] like Figure 10 The left sub-image shows the curves illustrating the skin tone mask (i.e., skin tone protection factor), hue weight (i.e., target hue range weight), and hue adjustment weight (i.e., final adjustment weight). The interval constraints of these three curves visually demonstrate that only background pixels that simultaneously satisfy both non-skin tone and target adjustable hue ranges will receive a full hue shift adjustment. The hue adjustment weights for the portrait skin tone range and non-target background hue ranges are set to zero, achieving targeted protection of the portrait skin tone and independent correction of the background hue.

[0165] Figure 10 The middle sub-figure shows the contrast-weighted fusion response curve based on pixel brightness, divided into dark areas (i.e., dark area protection area), bright areas (i.e., bright area protection area), and non-dark and non-bright areas (i.e., midtone enhancement area). The dark and highlight areas significantly increase the fusion ratio of the original image to preserve the original brightness and darkness details. The midtone area increases the global high-contrast image fusion weight to enhance the image's layer contrast, solving the problems of loss of dark area details and highlight clipping caused by global linear histogram stretching.

[0166] Figure 10 The right-hand subplot shows the saturation correction response curves, which include two types of response trajectories: background saturation curves and skin saturation curves. The background saturation curve corresponds to the S-shaped weighting and knee-point hyperbolic tangent nonlinear compression processing logic, which moderately enhances color in the low saturation range, significantly improves vibrancy in the medium-high saturation range, and smoothly suppresses ultra-high saturation overflow after the saturation exceeds the knee-point threshold. The skin saturation curve corresponds to the processing logic that only makes small linear fine adjustments and does not enable high saturation compression. It stays close to the input and output baselines throughout, only slightly brightening the skin saturation to ensure that the skin tone of the portrait looks natural and without distortion.

[0167] See Figure 11 , Figure 11 This is a structural diagram of the image processing apparatus provided in the embodiments of this disclosure, such as... Figure 11 As shown, the image processing apparatus 40 includes:

[0168] Module 41 is used to acquire the input image;

[0169] The recognition module 42 is used to identify noise regions in the input image;

[0170] The brightness region determination module 43 is used to determine a first brightness noise region and a second brightness noise region in the noise region. The brightness of the first brightness noise region is lower than a first preset brightness threshold, and the brightness of the second brightness noise region is higher than the second preset brightness threshold. The first preset brightness threshold is less than or equal to the second preset brightness threshold.

[0171] The noise reduction processing module 44 is used to process the first luminance noise region of the input image with a first noise reduction intensity and process the second luminance noise region with a second noise reduction intensity to obtain the noise-reduced image; wherein the first noise reduction intensity is greater than the second noise reduction intensity.

[0172] As an optional implementation, the identification module 42 includes:

[0173] The preliminary noise recognition submodule is used to perform preliminary noise recognition on the input image to obtain a preliminary noise map;

[0174] The expansion processing submodule is used to perform morphological expansion processing on the initial screening noise points in the initial screening noise point map, and aggregate them to form a noise patch map.

[0175] The noise patch determination submodule is used to determine the contour parameters and / or neighborhood occupancy of each noise patch based on the noise patch map; wherein, the contour parameters include at least one of the following: contour area, contour aspect ratio, and neighborhood occupancy represents the density of the noise patch distribution in the corresponding neighborhood;

[0176] The noise patch removal submodule is used to remove noise patches that do not meet the screening criteria. The screening criteria include at least one of the following: the outline area is less than a preset area threshold, the outline aspect ratio is less than a preset aspect ratio threshold, and the neighborhood occupancy rate is less than a preset occupancy rate threshold.

[0177] The noise region determination submodule is used to determine the image region corresponding to the noise patch that is retained after removal as the noise region of the input image.

[0178] In this embodiment, differentiated noise reduction is implemented by distinguishing between different brightness noise regions. A strong first noise reduction intensity is applied to the first brightness noise region, effectively filtering out significant noise in dark areas and significantly improving image noise suppression. A weaker noise reduction intensity is applied to the second brightness noise region, preserving as much of the rich texture and edge details in bright areas as possible, while also achieving moderate smoothing and suppression of noise in bright areas. By matching differentiated noise reduction intensities to the two types of brightness noise regions, image noise reduction is effectively achieved, and image noise is sufficiently removed, while avoiding excessive blurring of details caused by globally uniform noise reduction. This balances noise reduction effectiveness with complete image detail restoration, resulting in a significant improvement in image quality.

[0179] As an optional implementation, the noise reduction processing module 44 includes:

[0180] The noise reduction intensity determination submodule is used to determine the first noise reduction intensity and the second noise reduction intensity based on the preset contour parameter threshold and / or neighborhood occupancy threshold.

[0181] The luminance noise region processing submodule is used to process a first luminance noise region with a first noise reduction intensity and a second luminance noise region with a second noise reduction intensity on the input image to obtain a noise-reduced image.

[0182] As an optional implementation, the noise patch determination submodule includes:

[0183] The equivalent ellipse fitting unit is used to fit the moment characteristics of the noise patch to obtain an equivalent ellipse to the noise patch.

[0184] The contour parameter determination unit is used to determine the aspect ratio of the corresponding noise patch based on the eigenvalues ​​of the equivalent ellipse, and use it as the contour parameter of the corresponding noise patch.

[0185] As an optional implementation, the noise patch determination submodule includes:

[0186] The binarization processing unit is used to perform binarization processing on the initial screening noise image to obtain the initial screening noise mask.

[0187] The noise mask calculation unit is used to calculate the initial noise mask using a preset circular convolution kernel to obtain the duty cycle response map.

[0188] The duty cycle value extraction unit is used to extract the duty cycle values ​​corresponding to the positions of each noise patch in the duty cycle response map;

[0189] The neighborhood occupancy determination unit is used to determine the neighborhood occupancy of the corresponding noise patch using the duty cycle value.

[0190] As an optional implementation, the preliminary noise identification submodule includes:

[0191] The low-frequency region acquisition unit is used to perform median filtering on the input image to obtain the low-frequency region;

[0192] The high-frequency region acquisition unit is used to remove low-frequency regions from the input image to obtain high-frequency regions;

[0193] The initial noise image acquisition unit is used to identify and retain pixels in high-frequency regions whose pixel values ​​are lower than a preset pixel threshold, thereby obtaining an initial noise image.

[0194] The image processing device 40 is capable of implementing the embodiments of this disclosure. Figure 1The various processes in the method embodiments, and the ways to achieve the same beneficial effects, will not be repeated here to avoid repetition.

[0195] See Figure 12 This disclosure also provides a tone correction image generation apparatus 50, comprising:

[0196] The hue weight calculation module 51 is used to calculate the hue weight based on the adjustable hue value range. The hue weight is used to limit the range of hues that participate in the hue adjustment.

[0197] The skin color mask generation module 52 is used to generate a skin color mask based on the tonal range corresponding to the skin color of the portrait. The skin color mask is used to suppress tonal adjustments in the skin color area.

[0198] The saturation weight generation module 53 is used to generate saturation weights based on a preset saturation threshold. The saturation weights are used to filter adjustable pixels that meet the saturation conditions.

[0199] The brightness weight generation module 54 is used to generate brightness weights based on a preset brightness threshold. The brightness weights are used to filter adjustable pixels that meet the brightness conditions.

[0200] The hue adjustment weight generation module 55 is used to fuse hue weight, skin color mask, saturation weight and brightness weight to obtain hue adjustment weight;

[0201] The tone correction image generation module 56 is used to perform tone correction on the noise-reduced image according to the tone adjustment weight and the preset tone offset to obtain the tone correction image.

[0202] In this embodiment, a refined tone adjustment weight is obtained by fusing hue weight, saturation weight, brightness weight, and skin tone mask. Then, based on this tone adjustment weight and a preset tone offset, differential tone correction is performed pixel-by-pixel on the denoised image to generate a tone-corrected image. The skin tone mask significantly attenuates the adjustment weight corresponding to the skin tone region of the portrait, suppressing the tone offset of face and skin pixels. Only background pixels that simultaneously meet the hue, saturation, and brightness thresholds are subject to a complete tone offset. This allows for targeted correction of tone deviations in the background region, such as uniformly correcting a yellowish-green background to standard green and a bluish background to standard blue, thus achieving background color uniformity optimization. Furthermore, while accurately correcting background color cast and unifying the visual appearance of the background tone, the entire process avoids interference from the color correction algorithm on the portrait's skin tone, effectively preserving the color fidelity of the original skin tone and preventing distortion problems such as yellowing, greening, or bluish discoloration of the face. Pixel-level regional color correction is achieved through multi-dimensional weight joint constraints, balancing background color correction needs with the protection of the portrait's skin tone, significantly improving the overall visual naturalness and image quality of the final tone-corrected image.

[0203] This disclosure also provides an image processing system, including an image processing device 40 and a tone correction image generation device 50.

[0204] See Figure 13 This disclosure also provides a contrast-corrected image generation apparatus 60, comprising:

[0205] The global contrast image generation module 61 is used to process the denoised image using a linear histogram stretching algorithm to generate a global contrast image.

[0206] The inverse luminance base mask construction module 62 is used to construct an inverse luminance base mask based on the luminance value of each pixel in the denoised image.

[0207] The protection weight determination module 63 is used to determine the dark area protection weight and the highlight protection weight respectively according to the pixel brightness distribution pattern in the image after noise reduction.

[0208] The fused luminance mask generation module 64 is used to fuse the inverse luminance base mask, the dark area protection weight, and the highlight protection weight to obtain the fused luminance mask.

[0209] The contrast-corrected image generation module 65 is used to perform weighted fusion of the noise-reduced image and the global contrast image based on the fused luminance mask to obtain a contrast-corrected image.

[0210] In this embodiment, constraints are imposed on both bright and dark areas by using shadow protection weights and highlight protection weights. This significantly increases the proportion of the original image during fusion calculations, effectively preserving texture details in both shadow and highlight areas and avoiding the loss of shadow information and overexposure of highlights caused by global stretching. Simultaneously, gain control is applied to the mid-grayscale range of the image using an inverse luminance base mask. This fully introduces the contrast enhancement effect of the global contrast image into transition areas that are neither shadow nor highlight, strengthening the image's layering and clarity, thereby further enhancing the display effect of the obtained contrast-corrected image. In other words, this embodiment improves the overall clarity of the contrast-corrected image while dynamically suppressing the overflow of highlight details (i.e., details in bright areas) and the loss of details in shadow areas caused by contrast enhancement.

[0211] This disclosure also provides another image processing system, including an image processing device 40 and a contrast-corrected image generation device 60.

[0212] This disclosure also provides another image processing system, including a tone-corrected image generation device 50 and a contrast-corrected image generation device 60.

[0213] This disclosure also provides another image processing system, including an image processing device 40, a tone-corrected image generation device 50, and a contrast-corrected image generation device 60.

[0214] See Figure 14 This disclosure also provides a corrected image generation apparatus 70, comprising:

[0215] The initial saturation adjustment generation module 71 is used to process the original saturation of each pixel in the noise-reduced image based on a preset coefficient to obtain the initial saturation adjustment of each pixel.

[0216] Transition adjustment weight construction module 72 is used to construct the S-shaped transition adjustment weight of each pixel based on the original saturation of each pixel;

[0217] The blend saturation generation module 73 is used to adjust the weights of the S-shaped transition and weightedly fuse the original saturation and the initial adjusted saturation of each pixel to obtain the blend saturation of each pixel.

[0218] The judgment module 74 is used to determine whether the blend saturation of each pixel is greater than the preset saturation compression knee threshold.

[0219] The first target saturation determination module 75 is used to perform hyperbolic tangent compression processing on the mixed saturation if the judgment result of the judgment module 74 is yes, so as to obtain the target saturation of the corresponding pixel.

[0220] The second target saturation determination module 76 is used to determine the target saturation of the corresponding pixel if the judgment result of the judgment module 74 is negative.

[0221] The image correction generation module 77 is used to obtain a corrected image based on the target saturation of each pixel.

[0222] In this embodiment, saturation optimization is performed in layers: First, saturation is increased by a preset coefficient to enhance the overall color vibrancy of the image; then, an S-shaped transition adjustment weight is used to weightedly blend the original and stretched saturation, moderately enhancing low-saturation areas and smoothly transitioning between high and low saturation ranges to eliminate the color disjointness caused by abrupt saturation changes; finally, a saturation compression knee threshold is set, applying hyperbolic tangent nonlinear compression only to ultra-high saturation pixels to gently suppress color overflow and glaring issues in high-saturation areas, avoiding color block distortion caused by hard truncation. This embodiment balances color richness and naturalness, enhancing the image's clarity and vibrancy while suppressing color overflow distortion in ultra-high saturation areas, effectively improving the visual display effect of the final corrected image.

[0223] This disclosure also provides an image processing system, including an image processing device 40 and a corrected image generation device 70.

[0224] This disclosure also provides another image processing system, including a tone correction image generation device 50 and a correction image generation device 70.

[0225] This disclosure also provides another image processing system, including a contrast-corrected image generation device 60 and a correction image generation device 70.

[0226] This disclosure also provides another image processing system, including a tone correction image generation device 50, a contrast correction image generation device 60, and a correction image generation device 70.

[0227] This disclosure also provides another image processing system, including an image processing device 40, a tone correction image generation device 50, a contrast correction image generation device 60, and a correction image generation device 70.

[0228] This disclosure also provides an electronic device. See also... Figure 15 The electronic device may include a processor 1501, a memory 1502, and a program 15021 stored in the memory 1502 and executable on the processor 1501. When the program 15021 is executed by the processor 1501, it can achieve... Figure 1 , Figure 7 , Figure 8 or Figure 9 Any steps in the corresponding method embodiments and the achievement of the same beneficial effects will not be repeated here.

[0229] Those skilled in the art will understand that all or part of the steps of the methods described in the above embodiments can be implemented by hardware related to program instructions, and the program can be stored in a readable medium. This disclosure also provides a readable storage medium storing a computer program, which, when executed by a processor, can implement the above... Figure 1 , Figure 7 , Figure 8 or Figure 9 Any step in the corresponding method embodiment can achieve the same technical effect, and will not be repeated here to avoid repetition.

[0230] The aforementioned storage media include read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0231] This disclosure also provides a computer program product, including computer instructions, which, when executed by a processor, can perform the above-described functions. Figure 1 , Figure 7 , Figure 8 or Figure 9 Any step in the corresponding method embodiment can achieve the same technical effect, and will not be repeated here to avoid repetition.

[0232] The above content describes preferred embodiments of this disclosure. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles disclosed herein, and these improvements and modifications should also be considered within the scope of protection of this disclosure.

Claims

1. An image processing method, characterized in that, include: Obtain the input image; Identify the noise regions in the input image; A first brightness noise region and a second brightness noise region are determined in the noise region. The brightness of the first brightness noise region is lower than a first preset brightness threshold, and the brightness of the second brightness noise region is higher than a second preset brightness threshold. The first preset brightness threshold is less than or equal to the second preset brightness threshold. The input image is processed with a first noise reduction intensity for the first luminance noise region and with a second noise reduction intensity for the second luminance noise region to obtain a noise-reduced image; wherein the first noise reduction intensity is greater than the second noise reduction intensity.

2. The method according to claim 1, characterized in that, The step of identifying noise regions in the input image includes: The input image is subjected to preliminary noise identification to obtain a preliminary noise map; Morphological dilation processing is performed on the initial screening noise points in the initial screening noise point map to aggregate them into a noise patch map. Based on the noise patch map, determine the contour parameters and / or neighborhood occupancy of each noise patch; wherein, the contour parameters include at least one of the following: contour area, contour aspect ratio, and the neighborhood occupancy represents the density of the noise patch distribution in the corresponding neighborhood; Noise patches that do not meet the screening criteria are removed; the screening criteria include at least one of the following: the outline area is less than a preset area threshold, the outline aspect ratio is less than a preset aspect ratio threshold, and the neighborhood occupancy rate is less than a preset occupancy threshold. The image region corresponding to the noise patch that is retained after removal is determined as the noise region of the input image.

3. The method according to claim 2, characterized in that, The step of processing the first luminance noise region with a first noise reduction intensity and the second luminance noise region with a second noise reduction intensity to obtain a noise-reduced image includes: The first noise reduction intensity and the second noise reduction intensity are determined based on the preset contour parameter threshold and / or neighborhood occupancy threshold. The input image is processed with a first noise reduction intensity for the first luminance noise region and with a second noise reduction intensity for the second luminance noise region to obtain a noise-reduced image.

4. The method according to claim 2, characterized in that, The step of determining the contour parameters and / or neighborhood occupancy of each noise patch based on the noise patch map includes: An equivalent ellipse to the noise patch is obtained by fitting the moment characteristics of the noise patch; Based on the eigenvalues ​​of the equivalent ellipse, the aspect ratio of the corresponding noise patch is determined and used as the contour parameter of the corresponding noise patch. And / or, The initial screening noise image is binarized to obtain the initial screening noise mask; The initial screening noise mask is calculated using a preset circular convolution kernel to obtain the duty cycle response map; Extract the duty cycle values ​​corresponding to the positions of each noise patch in the duty cycle response map; The duty cycle value is used as the neighborhood occupancy rate of the corresponding noise patch.

5. The method according to claim 2, characterized in that, The step of performing preliminary noise identification on the input image to obtain a preliminary noise map includes: The input image is subjected to median filtering to obtain the low-frequency region; Remove the low-frequency region from the input image to obtain the high-frequency region; Identify and retain pixels in the high-frequency region whose pixel values ​​are lower than a preset pixel threshold to obtain the initial noise map.

6. The method according to claim 1, characterized in that, After the step of processing the first luminance noise region with a first noise reduction intensity and the second luminance noise region with a second noise reduction intensity to obtain a noise-reduced image, the method further includes: The hue weight is calculated based on the adjustable hue value range, and the hue weight is used to limit the hue range participating in the hue adjustment. A skin color mask is generated based on the color tone range corresponding to the skin tone of the portrait. The skin color mask is used to suppress color tone adjustment in the skin tone area. Based on a preset saturation threshold, a saturation weight is generated, which is used to filter adjustable pixels that meet the saturation conditions. A brightness weight is generated based on a preset brightness threshold, and the brightness weight is used to filter adjustable pixels that meet the brightness conditions; The hue weight, the skin color mask, the saturation weight, and the brightness weight are combined to obtain the hue adjustment weight; The image after noise reduction is to be toned based on the tone adjustment weight and the preset tone offset to obtain a tone-corrected image.

7. The method according to claim 1, characterized in that, After the step of processing the first luminance noise region with a first noise reduction intensity and the second luminance noise region with a second noise reduction intensity to obtain a noise-reduced image, the method further includes: The denoised image is processed using a linear histogram stretching algorithm to generate a global comparison image; Based on the brightness value of each pixel in the image after noise reduction, an inverse brightness base mask is constructed. Based on the pixel brightness distribution pattern in the image after noise reduction, the dark area protection weight and the highlight protection weight are determined respectively. The inverse luminance base mask, the dark area protection weight, and the highlight protection weight are fused to obtain the fused luminance mask; Based on the fused luminance mask, the denoised image and the global contrast image are weighted and fused to obtain a contrast-corrected image.

8. The method according to claim 1, characterized in that, After the step of processing the first luminance noise region with a first noise reduction intensity and the second luminance noise region with a second noise reduction intensity to obtain a noise-reduced image, the method further includes: The original saturation of each pixel in the image after noise reduction is processed based on a preset coefficient to obtain the initial adjusted saturation of each pixel. Based on the original saturation of each pixel, construct the S-shaped transition adjustment weight for each pixel; Based on the S-shaped transition adjustment weight, the original saturation and the initial adjusted saturation of each pixel are weighted and fused to obtain the mixed saturation of each pixel; Determine whether the blend saturation of each pixel is greater than a preset saturation compression knee threshold; If so, perform hyperbolic tangent compression on the mixed saturation to obtain the target saturation of the corresponding pixel; If not, use the mixed saturation as the target saturation of the corresponding pixel; The corrected image is obtained based on the target saturation of each pixel.

9. An image processing apparatus, characterized in that, include: The acquisition module is used to acquire the input image; A recognition module is used to identify noise regions in the input image; A brightness region determination module is used to determine a first brightness noise region and a second brightness noise region in the noise region, wherein the brightness of the first brightness noise region is lower than a first preset brightness threshold, the brightness of the second brightness noise region is higher than a second preset brightness threshold, and the first preset brightness threshold is less than or equal to the second preset brightness threshold. The noise reduction processing module is used to process the first luminance noise region of the input image with a first noise reduction intensity and the second luminance noise region with a second noise reduction intensity to obtain a noise-reduced image; wherein the first noise reduction intensity is greater than the second noise reduction intensity.

10. An electronic device, comprising: A memory, a processor, and a program stored in the memory and executable on the processor; characterized in that the processor is configured to read the program from the memory to implement the steps of the image processing method as described in any one of claims 1 to 8.