Image noise reduction processing method and device, equipment, storage medium and program product
By using the DCT method and sliding window parameter optimization in image noise reduction processing, the problem of difficulty in balancing efficiency and quality in the existing technology is solved, and efficient, low-power image noise reduction processing is achieved, which is suitable for mobile devices.
Patent Information
- Application Number
- CN202310342309.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-31
- Publication Date
- 2024-10-01
AI Technical Summary
Existing image noise reduction processing algorithms cannot simultaneously improve image noise reduction processing efficiency and quality, especially in mobile devices, which require a large amount of calculation and are difficult to meet the demand for high-quality image display.
The DCT-based image noise reduction processing method is used to perform sliding window processing on the image by obtaining the target sliding window parameters, and combined with DCT noise reduction processing, the sliding window and noise reduction processing are alternately performed to reduce the amount of calculation and improve efficiency, while ensuring that the image quality.
It effectively reduces the calculation amount of image noise reduction processing, improves processing efficiency, and provides high-quality noise reduction effects while ensuring image quality. It is suitable for small mobile devices with low power consumption.
Smart Images

Figure CN118741018A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to an image noise reduction processing method, device, equipment, storage medium and program product. Background Art
[0002] In order to reduce image noise and improve image quality, various image noise reduction algorithms have been proposed, and image noise reduction algorithms have been applied to various mobile devices. Through this algorithm, the image acquired by the mobile device can be noise-reduced so that the mobile device can display high-quality images.
[0003] Currently, with the development of mobile devices, the number of images that need to be denoised is also growing rapidly. At the same time, users require higher and higher quality images displayed on mobile devices. Therefore, it is required that the image denoising algorithm used in mobile devices can improve the efficiency of image denoising and ensure the quality of the denoised images.
[0004] However, current image denoising algorithms cannot simultaneously take into account both efficiency and quality during the image denoising process. Summary of the invention
[0005] Based on this, it is necessary to provide an image denoising processing method, device, equipment, storage medium and program product that can reduce the amount of image denoising processing calculation to improve processing efficiency while ensuring the quality of image denoising processing in response to the above technical problems.
[0006] In a first aspect, the present application provides an image noise reduction processing method. The method comprises:
[0007] Acquire a target image to be subjected to noise reduction processing;
[0008] Performing sliding window processing on the target image according to a target sliding window parameter to obtain a plurality of local image blocks, wherein the target sliding window parameter is determined from a sliding window parameter database according to at least one of noise reduction speed requirement information and image detail information corresponding to the target image, and the sliding window parameter database includes a plurality of sliding window parameters;
[0009] Performing DCT denoising processing on each local image block to obtain multiple denoised local image blocks; wherein the DCT denoising processing on each local image block and the sliding window processing on the target image according to the target sliding window parameters are performed alternately;
[0010] A denoised image after denoising processing corresponding to the target image is obtained according to the multiple denoised local image blocks.
[0011] In one of the embodiments, the target sliding window parameters include a size parameter and a stride parameter, and sliding window processing is performed on the target image according to the target sliding window parameters to obtain multiple local image blocks, including: sliding from the target image based on the stride parameter to obtain multiple local image blocks matching the size parameter.
[0012] In one of the embodiments, DCT noise reduction processing is performed on each local image block, including: for each local image block, performing DCT transform processing on the local image block to obtain a DCT coefficient matrix, filtering the DCT coefficients in the DCT coefficient matrix according to preset filtering parameters, and performing inverse DCT transform processing on the filtered DCT coefficient matrix to obtain the denoised local image block.
[0013] In one of the embodiments, filtering the DCT coefficients in the DCT coefficient matrix according to preset filtering parameters includes: determining target DCT coefficients from the DCT coefficient matrix according to a noise reduction target corresponding to the target image; and filtering the target DCT coefficients based on the filtering parameters.
[0014] In one embodiment, the DCT coefficient matrix includes DC coefficients and AC coefficients, and the target DCT coefficients are determined from the DCT coefficient matrix according to the noise reduction target corresponding to the target image, including: if the noise reduction target is that the noise reduction intensity of the target image meets a preset intensity condition, then the AC coefficient is used as the target DCT coefficient.
[0015] In one embodiment, the DCT coefficient includes a DC coefficient and an AC coefficient, and the target DCT coefficient is determined from the DCT coefficient matrix according to the noise reduction target corresponding to the target image, including: if the noise reduction target is to retain the low-frequency texture features in the target image and remove the noise in the target image, then the other AC coefficients in the AC coefficient other than the first AC coefficient and the second AC coefficient adjacent to the DC coefficient are used as the target DCT coefficient.
[0016] In one of the embodiments, the method also includes: acquiring a plurality of scene images taken with continuous exposure, and determining a reference noise image from the plurality of scene images; performing time domain noise reduction processing on the reference image to obtain a reference denoised image; converting the reference noise image and the reference denoised image into YUV images to obtain a YUV noise image and a YUV denoised image; and obtaining the filtering parameters according to the YUV noise image and the YUV denoised image.
[0017] In one of the embodiments, the filtering parameters are obtained according to the YUV noise image and the YUV denoised image, including: performing sliding window processing on the YUV noise image and the YUV denoised image respectively to obtain multiple noise image blocks and multiple denoised image blocks, and performing DCT transformation processing on each noise image block and each denoised image block to obtain multiple noise DCT coefficient matrices and multiple denoised DCT coefficient matrices; determining the filtering parameters according to the AC coefficients in the multiple noise DCT coefficient matrices and the AC coefficients in the multiple denoised DCT coefficient matrices.
[0018] In one embodiment, the filtering parameters include threshold parameters, and the filtering parameters are determined according to the AC coefficients in the multiple noise DCT coefficient matrices and the AC coefficients in the multiple denoising DCT coefficient matrices, including: determining multiple DCT coefficient groups from the multiple noise DCT coefficient matrices and the multiple denoising DCT coefficient matrices, each DCT coefficient group including a noise DCT coefficient matrix and a denoising DCT coefficient matrix corresponding to the same local image area; for each DCT coefficient group, using the noise DCT coefficient matrix in the DCT coefficient group corresponding to the Y channel in the DCT coefficient group as the first reference AC coefficient, and the denoising DCT coefficient matrix corresponding to the Y channel as the second reference AC coefficient, and determining candidate threshold parameters based on the first reference AC coefficient and the second reference AC coefficient; determining the threshold parameter according to each candidate threshold parameter.
[0019] In one embodiment, determining a candidate threshold parameter based on the first reference AC coefficient and the second reference AC coefficient includes: obtaining sub-amplitudes corresponding to the first amplitude information and the second amplitude information, respectively, and determining the absolute value of the difference between the sub-amplitudes; obtaining the maximum value among the absolute values; determining the first target sub-amplitude of the corresponding first amplitude information and the second target sub-amplitude of the second amplitude information according to the maximum value; and taking the maximum value between the absolute value of the first target sub-amplitude and the absolute value of the second target sub-amplitude as the candidate threshold parameter.
[0020] In one embodiment, the filtering parameters include compression parameters, and the filtering parameters are determined based on the AC coefficients in the multiple noise DCT coefficient matrices and the AC coefficients in the multiple denoising DCT coefficient matrices, including: for each DCT coefficient group, using the noise DCT coefficient matrix in the DCT coefficient group corresponding to the U channel in the DCT coefficient group as the third reference AC coefficient, the denoising DCT coefficient matrix corresponding to the U channel as the fourth reference AC coefficient, the noise DCT coefficient matrix corresponding to the V channel as the fifth reference AC coefficient, and the denoising DCT coefficient matrix corresponding to the V channel as the sixth reference AC coefficient, and determining candidate compression parameters based on the third reference AC coefficient, the fourth reference AC coefficient, the fifth reference AC coefficient and the sixth reference AC coefficient; determining the candidate parameter based on each candidate compression parameter.
[0021] In one embodiment, determining candidate compression parameters based on the third reference AC coefficient, the fourth reference AC coefficient, the fifth reference AC coefficient and the sixth reference AC coefficient includes: determining the U channel candidate compression parameter according to the average value of the ratio of the third amplitude information of the third reference AC coefficient to the fourth amplitude information of the fourth reference AC coefficient; determining the V channel candidate compression parameter according to the average value of the ratio of the fifth amplitude information of the fifth reference AC coefficient to the sixth amplitude information of the sixth reference AC coefficient; and taking the average of the U channel candidate compression parameter and the V channel candidate compression parameter as the candidate compression parameter.
[0022] In one of the embodiments, a denoised image after denoising corresponding to the target image is obtained based on the multiple denoising local image blocks, including: determining a non-overlapping area and an overlapping area based on the multiple denoising local image blocks, the overlapping area being an image area formed by overlapping multiple target denoising local image blocks, and the non-overlapping area being an image area formed by a single denoising local image block; calculating a pixel value of each pixel point corresponding to the overlapping area; and obtaining the denoised image based on the pixel value of each pixel point corresponding to the non-overlapping area and the pixel value of each pixel point corresponding to the overlapping area.
[0023] In one of the embodiments, the pixel value of each pixel point corresponding to the overlapping area is calculated, including: using an interpolation method to determine the weight value of each target denoising local image block for the overlapping area; based on each weight value and the pixel value corresponding to each target denoising local image block, performing weighted averaging processing to obtain the pixel value of each pixel point corresponding to the overlapping area.
[0024] In a second aspect, the present application also provides an image noise reduction processing device. The device comprises:
[0025] An acquisition module, used for acquiring a target image to be subjected to noise reduction processing;
[0026] a sliding window module, configured to perform sliding window processing on the target image according to a target sliding window parameter to obtain a plurality of local image blocks, wherein the target sliding window parameter is determined from a sliding window parameter database according to at least one of noise reduction speed requirement information and image detail information corresponding to the target image, and the sliding window parameter database includes a plurality of sliding window parameters;
[0027] A denoising module, configured to perform DCT denoising processing on each of the local image blocks to obtain a plurality of denoised local image blocks; wherein the DCT denoising processing on each local image block and the sliding window processing on the target image according to the target sliding window parameters are performed alternately;
[0028] A determination module is used to obtain a denoised image after denoising corresponding to the target image according to the multiple denoised local image blocks.
[0029] In one of the embodiments, the target sliding window parameter includes a size parameter and a stride parameter, and the sliding window module is specifically used to: based on the stride parameter, slide from the target image to obtain a plurality of local image blocks matching the size parameter.
[0030] In one of the embodiments, the noise reduction module is specifically used to: for each local image block, perform DCT transform processing on the local image block to obtain a DCT coefficient matrix, filter the DCT coefficients in the DCT coefficient matrix according to preset filtering parameters, and perform inverse DCT transform processing on the filtered DCT coefficient matrix to obtain the denoised local image block.
[0031] In one of the embodiments, the noise reduction module is specifically used to: determine the target DCT coefficient from the DCT coefficient matrix according to the noise reduction target corresponding to the target image; and perform filtering processing on the target DCT coefficient based on the filtering parameter.
[0032] In one embodiment, the DCT coefficient matrix includes DC coefficients and AC coefficients, and the noise reduction module is specifically used to: if the noise reduction target is that the noise reduction intensity of the target image meets a preset intensity condition, then use the AC coefficient as the target DCT coefficient.
[0033] In one embodiment, the DCT coefficient includes a DC coefficient and an AC coefficient, and the noise reduction module is specifically used to: if the noise reduction target is to retain the low-frequency texture features in the target image and remove the noise in the target image, then the other AC coefficients in the AC coefficient other than the first AC coefficient and the second AC coefficient adjacent to the DC coefficient are used as the target DCT coefficient.
[0034] In one embodiment, the device further comprises:
[0035] The parameter determination module is used to obtain multiple scene images taken by continuous exposure, and determine a reference noise image from the multiple scene images; perform time domain noise reduction processing on the reference noise image to obtain a reference denoised image; convert the reference noise image and the reference denoised image into YUV images to obtain a YUV noise image and a YUV denoised image; and obtain the filtering parameters according to the YUV noise image and the YUV denoised image.
[0036] In one of the embodiments, the parameter determination module is specifically used to: perform sliding window processing on the YUV noise image and the YUV denoised image respectively to obtain multiple noise image blocks and multiple denoised image blocks, and perform DCT transformation processing on each noise image block and each denoised image block to obtain multiple noise DCT coefficient matrices and multiple denoised DCT coefficient matrices; determine the filtering parameters according to the AC coefficients in the multiple noise DCT coefficient matrices and the AC coefficients in the multiple denoised DCT coefficient matrices.
[0037] In one embodiment, the filtering parameters include threshold parameters, and a parameter determination module is specifically used to: determine multiple DCT coefficient groups from the multiple noise DCT coefficient matrices and the multiple denoising DCT coefficient matrices, each DCT coefficient group includes a noise DCT coefficient matrix and a denoising DCT coefficient matrix corresponding to the same local image area; for each DCT coefficient group, use the noise DCT coefficient matrix corresponding to the Y channel in the DCT coefficient group as the first reference AC coefficient, and the denoising DCT coefficient matrix corresponding to the Y channel as the second reference AC coefficient, and determine a candidate threshold parameter based on the first reference AC coefficient and the second reference AC coefficient; determine the threshold parameter according to each candidate threshold parameter.
[0038] In one embodiment, the parameter determination module is specifically used to: obtain the first amplitude information of the first reference AC coefficient and the second amplitude information of the second reference AC coefficient; obtain the sub-amplitudes corresponding to the first amplitude information and the second amplitude information, respectively, and determine the absolute value of the difference between the sub-amplitudes; obtain the maximum value among the absolute values; determine the corresponding first target sub-amplitude of the first amplitude information and the second target sub-amplitude of the second amplitude information according to the maximum value; and use the maximum value between the absolute value of the first target sub-amplitude and the absolute value of the second target sub-amplitude as a candidate threshold parameter.
[0039] In one embodiment, the filtering parameters include compression parameters, and a parameter determination module is specifically used to: for each DCT coefficient group, use the noise DCT coefficient matrix corresponding to the U channel in the DCT coefficient group as the third reference AC coefficient, the denoised DCT coefficient matrix corresponding to the U channel as the fourth reference AC coefficient, the noise DCT coefficient matrix corresponding to the V channel as the fifth reference AC coefficient, and the denoised DCT coefficient matrix corresponding to the V channel as the sixth reference AC coefficient, and determine the candidate compression parameter based on the third reference AC coefficient, the fourth reference AC coefficient, the fifth reference AC coefficient and the sixth reference AC coefficient; determine the candidate parameter according to each candidate compression parameter.
[0040] In one embodiment, the parameter determination module is specifically used to: determine the U channel candidate compression parameter according to the average value of the ratio of the third amplitude information of the third reference AC coefficient to the fourth amplitude information of the fourth reference AC coefficient; determine the V channel candidate compression parameter according to the average value of the ratio of the fifth amplitude information of the fifth reference AC coefficient to the sixth amplitude information of the sixth reference AC coefficient; and use the average of the U channel candidate compression parameter and the V channel candidate compression parameter as the candidate compression parameter.
[0041] In one of the embodiments, the determination module is specifically used to: determine a non-overlapping area and an overlapping area based on the multiple denoising local image blocks, the overlapping area is an image area formed by the overlapping of multiple target denoising local image blocks, and the non-overlapping area is an image area formed by a single denoising local image block; calculate the pixel value of each pixel point corresponding to the overlapping area; and obtain the denoised image based on the pixel value of each pixel point corresponding to the non-overlapping area and the pixel value of each pixel point corresponding to the overlapping area.
[0042] In one of the embodiments, the determination module is specifically used to: determine the weight value of each target denoising local image block for the overlapping area by using the interpolation method; perform weighted averaging processing based on each weight value and the pixel value corresponding to each target denoising local image block to obtain the pixel value of each pixel point corresponding to the overlapping area.
[0043] In a third aspect, the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the methods described in the first aspect when executing the computer program.
[0044] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any one of the methods described in the first aspect above.
[0045] In a fifth aspect, the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of any one of the methods described in the first aspect are implemented.
[0046] In the above-mentioned image denoising processing method, apparatus, device, storage medium and program product, the electronic device obtains a target image to be subjected to denoising processing, performs sliding window processing on the target image according to the target sliding window parameter, obtains a plurality of local image blocks, and then performs DCT denoising processing on each local image block to obtain a plurality of denoised local image blocks, wherein the DCT denoising processing on each local image block and the sliding window processing on the target image according to the target sliding window parameter are performed alternately, and the denoised image after denoising processing corresponding to the target image is obtained through the plurality of denoised local image blocks. Wherein, since the target sliding window parameter is determined from a sliding window parameter database including a plurality of sliding window parameters according to at least one of the denoising speed requirement information and the image detail information corresponding to the target image; if the denoising speed requirement information or the image detail information corresponding to the target image is different, then the target sliding window parameter is different, and therefore, the target sliding window parameter is variable. Correspondingly, the amount of calculation for sliding window processing of the target image using different target sliding window parameters is different. Compared with fixed sliding window parameters, sliding window processing based on the target sliding window parameters determined by the denoising speed requirement information corresponding to the target image or the image detail information can effectively reduce the amount of calculation in the denoising process and improve the efficiency of the denoising process. At the same time, by performing DCT denoising on each local image block, the denoising effect and image denoising quality are guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 Schematic diagram of a process flow of an image noise reduction method in one embodiment;
[0048] Figure 2a A schematic diagram of a denoised image under the condition of having many image details in one embodiment;
[0049] Figure 2b A schematic diagram of another denoising image under the condition of more image details in one embodiment;
[0050] Figure 2c A schematic diagram of a denoised image under the condition of less image details in one embodiment;
[0051] Figure 2d A schematic diagram of another denoising image under the condition of less image details in one embodiment;
[0052] Figure 3a A schematic diagram of another denoising image under the condition of more image details in one embodiment;
[0053] Figure 3b A schematic diagram of another denoising image under the condition of more image details in one embodiment;
[0054] Figure 3c A schematic diagram of another denoising image under the condition of less image details in one embodiment;
[0055] Figure 3d A schematic diagram of another denoising image under the condition of less image details in one embodiment;
[0056] Figure 4 A schematic diagram of a DCT noise reduction process in one embodiment;
[0057] Figure 5 A schematic diagram of a DCT base pattern in one embodiment;
[0058] Figure 6 A schematic diagram of a process for determining filtering parameters in one embodiment;
[0059] Figure 7 A schematic diagram of another process for determining filtering parameters in one embodiment;
[0060] Figure 8 A schematic diagram of a process for determining a threshold parameter in one embodiment;
[0061] Fig. 9 A schematic diagram of a process for determining candidate compression parameters in one embodiment;
[0062] Fig.10a is a schematic diagram of an original noise image in one embodiment;
[0063] Fig.10b is a schematic diagram of a denoised image after time domain denoising processing in one embodiment;
[0064] Fig.10c A schematic diagram of a denoised image obtained by DCT denoising processing in an embodiment;
[0065] Fig.11 A schematic diagram of a process of filtering DCT coefficients in one embodiment;
[0066] Fig.12 A schematic diagram of a process for determining a denoised image in one embodiment;
[0067] Fig.13 A schematic diagram of an image overlapping area in an embodiment;
[0068] Fig.14 is a structural block diagram of an image noise reduction processing device in one embodiment;
[0069] Fig.15 FIG. 4 is a diagram showing the internal structure of an electronic device in one embodiment. DETAILED DESCRIPTION
[0070] 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.
[0071] With the popularity of mobile devices, the number of digital images generated every day is growing rapidly, and users' pursuit of image quality is also rising. Due to the presence of noise, the quality of images obtained by mobile devices is inevitably affected. In order to reduce noise and improve image quality, researchers have proposed various image denoising methods. Image denoising algorithms can be roughly divided into spatial domain denoising methods, transform domain denoising methods, denoising methods combining spatial domain and frequency domain, and deep learning denoising methods. Among them, bilateral filtering in spatial domain denoising methods is widely used, but it is difficult to process images with high noise levels. BM3D, as a method combining spatial domain and frequency domain denoising, is one of the traditional denoising methods with the best denoising effect, but this method has a large amount of calculation and is difficult to use for real-time denoising. Deep learning denoising methods are too complex and difficult to deploy on mobile devices.
[0072] In order to more conveniently reduce the noise of an image, an effective image noise reduction solution is provided for a small mobile device with low power consumption. The embodiment of the present application proposes a DCT-based image noise reduction processing method, which can achieve a good noise reduction effect with a small amount of calculation and obtain a high-quality noise-reduced image.
[0073] It should be noted that the image noise reduction processing method provided in the embodiment of the present application, its execution subject can be an image noise reduction processing device, and the image noise reduction processing device can be implemented as part or all of an electronic device through software, hardware, or a combination of software and hardware. Among them, the electronic device can be, but is not limited to, a camera device, a personal computer, a laptop computer, a smart phone, a tablet computer, a networked device, and a portable wearable device for image processing, wherein the camera device can be, for example, a monitoring device, etc., the portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc., and the Internet of Things device can be a smart TV, a smart car-mounted device, etc. The embodiment of the present application does not limit the type of the electronic device, as long as the electronic device is used for image noise reduction processing. Optionally, the image noise reduction processing device can also be deployed in an ISP (Image Signal Processing) chip, which is integrated in an electronic device to perform noise reduction processing on the image acquired by the electronic device. In the following method embodiments, the execution subject is an electronic device for explanation.
[0074] In one embodiment, Figure 1 As shown, a method for image noise reduction processing is provided, which is described by taking the method applied to an electronic device as an example, and includes the following steps:
[0075] Step 101: Acquire a target image to be subjected to noise reduction processing.
[0076] The target image may be an image captured by the electronic device in real time and currently requiring noise reduction processing, or may be an image pre-stored in the electronic device and currently extracted for noise reduction processing, or may be an image sent by other devices and received by the electronic device, or may be a frame image in a video image. For example, the electronic device is a monitoring device, which captures video images in real time, and uses each frame image in the video as a target image for real-time noise reduction processing.
[0077] Optionally, the target image may be in YUV format or other formats.
[0078] Step 102, performing sliding window processing on the target image according to the target sliding window parameter to obtain multiple local image blocks. The target sliding window parameter is determined from a sliding window parameter database according to at least one of the noise reduction speed requirement information and image detail information corresponding to the target image, and the sliding window parameter database includes multiple sliding window parameters.
[0079] Optionally, a sliding window parameter database may be deployed in the electronic device, including a plurality of sliding window parameters, each sliding window parameter may correspond to different noise reduction speed requirement information, or each sliding window parameter may also correspond to different image detail information.
[0080] Optionally, the electronic device may determine the target sliding window parameter from a sliding window parameter database in advance based on the user's input setting information, that is, the user may set the sliding window parameter used each time the image noise reduction process is performed according to the noise reduction requirements. Alternatively, the electronic device may also identify the current image processing scene for the target image in real time to determine at least one of the noise reduction speed requirement information or the image detail information corresponding to the target image, thereby obtaining the corresponding sliding window parameter from the database as the target sliding window parameter.
[0081] Optionally, the noise reduction speed requirement information may be information of different noise reduction speed requirement levels. The image detail information may be information of a large number of image details or a small number of image details.
[0082] Furthermore, the electronic device can traverse the target image based on the target sliding window parameters and perform sliding window processing on it, thereby obtaining multiple local image blocks corresponding to the target image.
[0083] It can be understood that, during the sliding window processing, a certain target area in the target image may exist in multiple local image blocks at the same time.
[0084] Optionally, the target image may be in RGB format, and the target image in RGB format is converted into YUV format and then subjected to sliding window processing and further DCT noise reduction processing.
[0085] Step 103: Perform DCT denoising processing on each local image block to obtain a plurality of denoised local image blocks.
[0086] The electronic device performs DCT noise reduction processing on each local image block to obtain a denoised local image block corresponding to each local image block.
[0087] The step of performing DCT noise reduction processing on each local image block and the step of performing sliding window processing on the target image according to the target sliding window parameters can be performed alternately.
[0088] It can be understood that, compared with the local image blocks, each denoised local image block is an image with better quality from which noise has been removed.
[0089] Wherein, DCT refers to Discrete Cosine Transform, which is the abbreviation of Discrete Cosine Transform. Therefore, the DCT denoising process refers to denoising the target image based on the DCT transform. In the embodiment of the present application, during the DCT denoising process, the target image is denoised based on the preset filtering parameters and the DCT transform to ensure the denoising effect of the target image.
[0090] Step 104: obtaining a denoised image corresponding to the target image after denoising according to the multiple denoised local image blocks.
[0091] In order to obtain a complete denoised image, the electronic device aggregates and reconstructs the denoised local image blocks obtained, thereby obtaining a denoised image corresponding to the complete target image, thereby completing the denoising process for the target image.
[0092] In the above-mentioned image denoising processing method, the electronic device obtains a target image to be subjected to denoising processing, performs sliding window processing on the target image according to the target sliding window parameters, obtains a plurality of local image blocks, and then performs DCT denoising processing on each local image block to obtain a plurality of denoised local image blocks, wherein the step of performing DCT denoising processing on each local image block and the step of performing sliding window processing on the target image according to the target sliding window parameters can be performed alternately, and the denoised image after denoising processing corresponding to the target image is obtained through the plurality of denoised local image blocks. Wherein, the target sliding window parameter is determined from a sliding window parameter database including a plurality of sliding window parameters according to at least one of the denoising speed requirement information and the image detail information corresponding to the target image. If the denoising speed requirement information or the image detail information corresponding to the target image is different, then the target sliding window parameter is different, and therefore, the target sliding window parameter is variable. Correspondingly, the amount of calculation for sliding window processing of the target image using different target sliding window parameters is different. Compared with fixed sliding window parameters, sliding window processing based on the target sliding window parameters determined by the denoising speed requirement information corresponding to the target image or the image detail information can effectively reduce the computational complexity of the denoising process and improve the efficiency of the denoising process.
[0093] The process of performing sliding window processing based on the target sliding window parameters is described below.
[0094] In one embodiment, the target sliding window parameters include a size parameter and a stride parameter, and sliding window processing is performed on the target image according to the target sliding window parameters to obtain multiple local image blocks, including: sliding from the target image based on the stride parameter to obtain multiple local image blocks matching the size parameter.
[0095] Based on the size parameter (FilterSize), the size of the local image block can be determined, and based on the stride parameter (Stride), the target image can be slid through to determine the position of each local image block, thereby obtaining each local image block. Optionally, the stride parameter is smaller than the size parameter of the corresponding direction in the target image.
[0096] The row size of the size parameter is Fr, and the column size is Fc. The row size of the stride parameter is Sr, and the column size is Sc. Then, the calculation amount of the algorithm (times / pixel) can be expressed by the formula:
[0097] multiplication:
[0098] addition:
[0099] It can be seen from the above formula that when Stride remains unchanged, the smaller the FilterSize, the smaller the algorithm calculation amount. When FilterSize remains unchanged, the larger the Stride, the smaller the algorithm calculation amount. However, while reducing the amount of calculation, it is also necessary to ensure the noise reduction effect. Therefore, the embodiment of the present application makes a compromise between the amount of calculation and the noise reduction effect.
[0100] In an optional embodiment of the present application, different noise reduction speed requirement information may correspond to different sliding window parameters. Specifically, different noise reduction speed requirement levels correspond to different sliding window parameters. For example, in scenarios with higher requirements for noise reduction speed, such as shooting moving objects, a set of smaller FilterSize and larger Stride may be selected; in scenarios with general requirements for noise reduction speed, such as shooting still objects, a set of moderate FilterSize and moderate Stride may be selected; in scenarios with lower requirements for noise reduction speed, such as image post-processing tasks, a set of larger FilterSize or smaller Stride may be selected. Optionally, as shown in Table 1, it shows several sets of sliding window parameters provided in an embodiment of the present application, as well as their corresponding noise reduction time and PSNR under the same hardware conditions. Among them, FilterSize is abbreviated as FS, and Stride is abbreviated as St.
[0101] (Table 1)
[0102] Sliding window parameters Time consumed / s PSNR DCT, FS = (8, 8), St = (1, 1) 15.82 27.14 DCT, FS = (8, 8), St = (4, 4) 1.16 26.39 DCT, FS = (16, 16), St = (1, 1) 19.04 27.34 DCT, FS = (16, 16), St = (4, 4) 1.41 27.06 DCT, FS = (16, 16), St = (8, 8) 0.59 26.88
[0103] According to the time consumption, the combination of FS=(16,16),St=(8,8) can be applied to the scene with high noise reduction speed requirements. The combination of FS=(8,8),St=(4,4) and FS=(16,16),St=(4,4) can be applied to the scene with average noise reduction speed requirements. The combination of FS=(8,8),St=(1,1) and the combination of FS=(16,16),St=(1,1) can be applied to the scene with low noise reduction speed requirements.
[0104] In another optional embodiment of the present application, the sizes of FilterSize and Stride may also be selected according to the content of the target scene, that is, different sliding window parameters may be determined based on different image detail requirements.
[0105] Specifically, for a local image block, during the DCT denoising process, the amplitude of some high-frequency DCT coefficients is set to 0 or compressed to a very small value under the action of the filtering parameters, resulting in the elimination or suppression of image details and noise, and the image becomes blurred. When most of the high-frequency DCT coefficients are 0, the denoising is close to mean filtering, that is, close to taking the average of the local image block within the FilterSize range.
[0106] Therefore, when the FilterSize is small, the influence of non-detail parts on detail parts can be reduced. When the Stride remains unchanged and the image has more details, a smaller FilterSize is used to retain more image details. When the image has fewer details, a larger FilterSize is used to suppress noise.
[0107] As shown in FIG2, a group of noise reduction image comparison schematic diagrams. Figure 2a It is the denoising result based on FS=(8,8) and St=(1,1) for an image with more details. Figure 2b It is the denoising result based on FS=(16,16) and St=(1,1) for images with more details. Figure 2c It is the denoising result based on FS=(8,8) and St=(1,1) for an image with less details. Figure 2d This is the denoising result based on FS=(16,16) and St=(1,1) for images with less details. It can be seen that the combination of FS=(8,8) and St=(1,1) retains more details when processing images with more details. When processing images with less details, the denoising effect of the combination of FS=(16,16) and St=(1,1) is better.
[0108] In addition, when the FilterSize remains unchanged, a smaller Stride can obtain more accurate image information when the image has more details. When the image has fewer details, the size of the Stride has little effect on the denoising result. A larger Stride can reduce the amount of calculation, so a larger Stride is selected.
[0109] As shown in FIG3, a group of noise reduction image comparison schematic diagrams. Figure 3a It is the denoising result based on FS=(16,16) and St=(1,1) for images with more details. Figure 3b It is the denoising result of FS=(16,16),St=(8,8) with more image details. Figure 3c It is the denoising result based on FS=(16,16) and St=(1,1) for images with less details. Figure 3d This is the denoising result of FS=(16,16),St=(8,8) for images with less details. It can be seen that when there are many details, the denoising result of FS=(16,16),St=(1,1) is more accurate. When there are few details, the difference between the results of the two combinations is not big, and using FS=(16,16),St=(8,8) can reduce the amount of calculation.
[0110] Therefore, based on the above description, it can be seen that the corresponding sliding window parameters are determined based on the image detail requirement information corresponding to the target image, which can ensure the image denoising processing efficiency and denoising quality.
[0111] Based on Table 2, the denoising results of the method for performing denoising according to variable sliding window parameters provided in an embodiment of the present application, the bilateral filtering denoising method in the prior art, and the BMD denoising method for the same RGB image of size 720*1280 are compared and explained.
[0112] (Table 2)
[0113] Time consumed / s PSNR Bilateral filtering 5.23 25.21 BM3D 14.20 27.58 DCT, FS = (8, 8), St = (1, 1) 15.82 27.14 DCT, FS = (8, 8), St = (4, 4) 1.16 26.39 DCT, FS = (16, 16), St = (1, 1) 19.04 27.34 DCT, FS = (16, 16), St = (4, 4) 1.41 27.06 DCT, FS = (16, 16), St = (8, 8) 0.59 26.88
[0114] It can be seen that in the DCT denoising method provided in the embodiment of the present application, reducing the FilterSize or increasing the Stride can reduce the amount of calculation, and at the same time the PSNR will also be reduced. Compared with the bilateral filtering method, the DCT denoising method has a higher PSNR and a better denoising effect. The DCT denoising method based on FS=(16, 16), St=(8, 8) takes only 0.59s, which is much less than the 5.23s of bilateral filtering. In this case, although the PSNR is slightly lower than BM3D, BM3D takes as much as 14.20s, which is 24 times that of the DCT denoising method, and is difficult to apply to low-power mobile devices.
[0115] In addition, since both FilterSize and Stride can be changed, it is more flexible than the existing technology and greatly improves the efficiency of the algorithm. Taking Stride = (1,1) as an example, reducing FilterSize can reduce the amount of algorithm calculation (times / pixel), as shown in Table 3. Taking FilterSize = (16,16) as an example, increasing Stride can reduce the amount of algorithm calculation (times / pixel), as shown in Table 4.
[0116] (Table 3)
[0117] FilterSize (4,16) (8,8) (8,16) (16,16) The amount of multiplication 2560 2048 6144 16384 The amount of calculation required for addition 2304 1792 5632 15360
[0118] (Table 4)
[0119]
[0120]
[0121] In the embodiment of the present application, the size and sliding stride of the local image block can be changed, and multiple local image blocks are obtained from the target image based on the corresponding size parameters and stride parameters, which greatly reduces the amount of calculation in the noise reduction process, improves the flexibility of the processing process, and improves the computational efficiency of the algorithm, so that the image denoising method can be applied to small mobile electronic devices with low power consumption.
[0122] As mentioned above, after each local image block is determined, DCT denoising processing is performed on each local image block. The DCT denoising processing process will be further described below.
[0123] In one embodiment, Figure 4 , which shows a schematic diagram of a DCT noise reduction process provided by an embodiment of the present application. Performing DCT noise reduction on each local image block includes:
[0124] Step 401: For each local image block, perform DCT transformation processing on the local image block to obtain a DCT coefficient matrix.
[0125] The DCT coefficient matrix includes multiple DCT coefficients. The frequency distribution of DCT coefficients is from low to high from the upper left corner to the lower right corner. The upper left corner is the 0-frequency coefficient, also called the direct current coefficient (DC coefficient), and the remaining coefficients are alternating current coefficients (AC coefficients). The closer the AC coefficient is to the DC coefficient, the lower the frequency it represents. Figure 5 As shown in the figure, a 16*16 DCT basis pattern is shown. The natural image is formed by the linear combination of these basis patterns. The magnitude of the DCT coefficient indicates the proportion of the basis pattern at that position in the natural image.
[0126] Step 402: Filter the DCT coefficients in the DCT coefficient matrix according to preset filtering parameters.
[0127] Step 403: Perform inverse DCT transformation on the filtered DCT coefficient matrix to obtain a denoised local image block.
[0128] The presence of noise will change the real pixel value of the image in the spatial domain. Reflected in the DCT frequency domain, the noise changes the real DCT coefficient amplitude of the image. In the embodiment of the present application, the function of the filtering parameter is to change the amplitude of the DCT coefficient of the noisy image so that the amplitude is close to the amplitude of the real image, so as to achieve the purpose of eliminating or suppressing noise.
[0129] The filtering parameters may include a threshold parameter T and a compression parameter λ. Specifically, the process of filtering the DCT coefficients in the DCT coefficient matrix according to the preset filtering parameters may include: setting the AC coefficients in the DCT domain of the luminance Y image whose absolute values are lower than T to 0, and it is considered that most of these amplitudes are caused by noise; compressing the DCT domain AC coefficients of the chrominance image UV by the compression parameter λ to achieve the effect of suppressing noise.
[0130] The process of predetermining the filtering parameters is described below.
[0131] In one embodiment, Figure 6As shown, it shows a schematic diagram of a process for determining filtering parameters provided by an embodiment of the present application. The image noise reduction processing method also includes:
[0132] Step 601 : acquiring a plurality of scene images captured by continuous exposure, and determining a reference noise image from the plurality of scene images.
[0133] Step 602: Perform time domain noise reduction processing on the reference noisy image to obtain a reference denoised image.
[0134] A frame image from a plurality of scene images in a continuously exposed shooting scene acquired by an electronic device is used as a reference noise image. At the same time, m frames of images before the reference image and m frames of images after the reference image are determined, and the determined images and the reference noise image are averaged to implement a time domain noise reduction process, and a reference denoised image corresponding to the reference noise image is obtained. The result of the time domain noise reduction process is a clean image after denoising. Optionally, m can be 12.
[0135] The average calculation of each determined image and the reference noise image can be expressed by the following formula:
[0136]
[0137] Among them, Image n (N) is a noisy image, Image nr (i) is the clean image after denoising. i represents the frame sequence number of the currently processed image among all images.
[0138] Step 603: Convert the reference noisy image and the reference denoised image into YUV images to obtain a YUV noisy image and a YUV denoised image.
[0139] Optionally, the reference noise image and the reference denoised image can be in RGB format. In an embodiment of the present application, the reference noise image and the reference denoised image are converted into YUV images and then the filtering parameters are further determined. In this way, the color correlation of the image can be removed, thereby improving the effect of subsequent denoising processing based on the filtering parameters and improving the accuracy of the denoising processing.
[0140] Step 604: Obtain filtering parameters according to the YUV noisy image and the YUV denoised image.
[0141] Please refer to Figure 7 , shows another flow chart of determining filtering parameters provided by an embodiment of the present application. Obtaining filtering parameters according to a YUV noise image and a YUV denoised image includes:
[0142] Step 701 , performing sliding window processing on the YUV noisy image and the YUV denoised image respectively to obtain a plurality of noisy image blocks and a plurality of denoised image blocks.
[0143] Optionally, the sliding window processing in step 701 may not cover the entire image like the sliding window processing in step 102, that is, the sliding window processing in step 701 may only be performed on partial areas of the YUV noisy image and the YUV denoised image.
[0144] The size of the size parameter in the sliding window parameter when performing sliding window processing on the YUV noise image and the YUV denoised image is consistent with the size FilterSize of the DCT transform block, for example, 8*8, 16*16, etc.
[0145] Step 702: Perform DCT transformation processing on each noisy image block and each denoised image block to obtain a plurality of noise DCT coefficient matrices and a plurality of denoised DCT coefficient matrices.
[0146] Each noise image block refers to a plurality of image blocks obtained by sliding window processing from a YUV noise image, and each denoised image block refers to a plurality of image blocks obtained by sliding window processing from a YUV denoised image. Correspondingly, each noise DCT coefficient matrix is a DCT coefficient matrix obtained by performing DCT transformation processing on each noise image block, and each denoised DCT coefficient matrix is a DCT coefficient matrix obtained by performing DCT transformation processing on each denoised image block.
[0147] Based on the above, it can be seen that each noise DCT coefficient matrix and each denoising DCT coefficient matrix also include DC coefficients and AC coefficients.
[0148] Step 703: determine filtering parameters according to the AC coefficients in the multiple noise DCT coefficient matrices and the AC coefficients in the multiple denoising DCT coefficient matrices.
[0149] Specifically, the filtering parameters include a threshold parameter and a compression parameter. The threshold parameter T can be determined based on the amplitude information of the AC coefficient corresponding to the Y channel in the noise DCT coefficient matrix and the amplitude information of the AC coefficient corresponding to the Y channel in each denoising DCT coefficient matrix. The compression parameter λ can be determined based on the amplitude information of the AC coefficient corresponding to the UV channel in the noise DCT coefficient matrix and the amplitude information of the AC coefficient corresponding to the UV channel in each denoising DCT coefficient matrix.
[0150] The process of determining the threshold parameters is first described below.
[0151] Please refer to Figure 8 , which shows a schematic diagram of a process for determining a threshold parameter provided by an embodiment of the present application. The filtering parameters include threshold parameters, and the filtering parameters are determined according to the AC coefficients in multiple noise DCT coefficient matrices and the AC coefficients in multiple denoising DCT coefficient matrices, including:
[0152] Step 801: Determine multiple DCT coefficient groups from multiple noise DCT coefficient matrices and multiple denoising DCT coefficient matrices. Each DCT coefficient group includes a noise DCT coefficient matrix and a denoising DCT coefficient matrix corresponding to the same local image region.
[0153] The noise DCT coefficient matrix and denoising DCT coefficient matrix corresponding to each other included in each DCT coefficient group are DCT coefficient matrices corresponding to image blocks at the same position in the reference noise image and the reference denoising image.
[0154] Step 802: For each DCT coefficient group, the noise DCT coefficient matrix corresponding to the Y channel in the DCT coefficient group is used as the first reference AC coefficient, and the denoised DCT coefficient matrix corresponding to the Y channel is used as the second reference AC coefficient, and the candidate threshold parameter is determined based on the first reference AC coefficient and the second reference AC coefficient.
[0155] Step 803: Determine a threshold parameter according to each candidate threshold parameter.
[0156] As mentioned above, the reference noise image and the reference denoised image are converted into YUV images, and the filtering parameters are determined based on the YUV noise image and the YUV denoised image. Therefore, the Y channel image, the U channel image and the V channel image corresponding to the YUV noise image can be converted to correspond to the DCT coefficient matrix respectively, forming the noise DCT coefficient matrix, and the AC coefficient in the DCT coefficient matrix corresponding to the Y channel image corresponding to the YUV noise image can be used as the first reference AC coefficient. Similarly, the Y channel image, the U channel image and the V channel image corresponding to the YUV denoised image can be converted to correspond to the DCT coefficient matrix respectively, forming the denoised DCT coefficient matrix, and the AC coefficient in the DCT coefficient matrix corresponding to the Y channel image corresponding to the YUV denoised image can be used as the second reference AC coefficient.
[0157] In one embodiment, determining the candidate threshold parameter based on the first reference AC coefficient and the second reference AC coefficient includes: obtaining the first amplitude information of the first reference AC coefficient and the second amplitude information of the second reference AC coefficient; determining the candidate threshold parameter according to the first amplitude information and the second amplitude information. Specifically, it may include: obtaining the first amplitude information of the first reference AC coefficient and the second amplitude information of the second reference AC coefficient; obtaining the sub-amplitudes corresponding to the first amplitude information and the second amplitude information, respectively, and determining the absolute value of the difference between the sub-amplitudes; obtaining the maximum value among the absolute values; determining the first target sub-amplitude of the corresponding first amplitude information and the second target sub-amplitude of the second amplitude information according to the maximum value; and taking the maximum value between the absolute value of the first target sub-amplitude and the absolute value of the second target sub-amplitude as the candidate threshold parameter.
[0158] The amplitude information refers to the amplitude of each AC coefficient. The sub-amplitude corresponding to the first amplitude information of the first reference AC coefficient is recorded as A Yn (i), the sub-amplitude corresponding to the second amplitude information of the second reference AC coefficient is recorded as A Ynr (i). where i=1, 2,...,F r *F c -1, F r and F c The row and column size of FilterSize. Optionally, the process of determining candidate threshold parameters is as follows:
[0159] First calculate A Yn (i) with A Ynr The absolute value of the difference between (i) and (i) is:
[0160] D(i)=|A Yn (i)-A Ynr (i)| (4)
[0161] Calculate the maximum index in D(i) and record it as i max , according to index i max Get the candidate threshold parameter T1 corresponding to the Y image block corresponding to the DCT coefficient group:
[0162] T1=max(|A Yn (i max )|, |A Ynr (i max )|) (5)
[0163] Among them, A Yn (i max ) is the maximum amplitude of the first reference AC coefficient, that is, the first target sub-amplitude, A Ynr (i max ) is the maximum amplitude of the second reference AC coefficient, that is, the second target sub-amplitude. As can be seen from Formula 5, the larger one of the absolute value of the first target sub-amplitude and the absolute value of the second target sub-amplitude can be used as the candidate threshold parameter.
[0164] Based on the above calculation process, the candidate threshold parameters T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T22, T23, T30, T41, T52, T63, T74, T85, T96, T10, T11, T22, T30, T41, T52, T63, T74, T85, T96, T10 X , where X is the number of DCT coefficient groups, and is also the number of noisy image blocks and denoised image blocks obtained by sliding window processing. The average value of each candidate threshold parameter is obtained:
[0165]
[0166] T is the threshold parameter.
[0167] The following is a description of the process of determining compression parameters.
[0168] In one embodiment, the filtering parameters include compression parameters, and the filtering parameters are determined based on the AC coefficients in multiple noise DCT coefficient matrices and the AC coefficients in multiple denoising DCT coefficient matrices, including: for each DCT coefficient group, using the noise DCT coefficient matrix corresponding to the U channel in the DCT coefficient group as the third reference AC coefficient, the denoising DCT coefficient matrix corresponding to the U channel as the fourth reference AC coefficient, the noise DCT coefficient matrix corresponding to the V channel as the fifth reference AC coefficient, and the denoising DCT coefficient matrix corresponding to the V channel as the sixth reference AC coefficient, and determining candidate compression parameters based on the third reference AC coefficient, the fourth reference AC coefficient, the fifth reference AC coefficient, and the sixth reference AC coefficient; determining candidate parameters based on each candidate compression parameter.
[0169] The above text explains that the Y channel image, U channel image and V channel image can be converted and correspond to the DCT coefficient matrix respectively. Based on this, in the embodiment of the present application, the AC coefficient in the DCT coefficient matrix corresponding to the U channel image corresponding to the YUV noise image is used as the third reference AC coefficient, and the AC coefficient in the DCT coefficient matrix corresponding to the U channel image corresponding to the YUV denoised image is used as the fourth reference AC coefficient; the AC coefficient in the DCT coefficient matrix corresponding to the V channel image corresponding to the YUV noise image is used as the fifth reference AC coefficient, and the AC coefficient in the DCT coefficient matrix corresponding to the V channel image corresponding to the YUV denoised image is used as the sixth reference AC coefficient.
[0170] In one embodiment, Fig. 9 As shown, it shows a schematic diagram of a process for determining a candidate compression parameter provided by an embodiment of the present application. Determining the candidate compression parameter based on the third reference AC coefficient, the fourth reference AC coefficient, the fifth reference AC coefficient, and the sixth reference AC coefficient includes:
[0171] Step 901: Determine a candidate compression parameter of a U channel according to an average value of a ratio of third amplitude information of a third reference AC coefficient to fourth amplitude information of a fourth reference AC coefficient.
[0172] The absolute value of the amplitude of the third reference AC coefficient is used as the third amplitude information, denoted as A Un (i) The absolute value of the amplitude of the fourth reference AC coefficient is used as the fourth amplitude information, denoted by A Unr (i), where i=1,2,...,F r *F c Based on the ratio of the third amplitude information to the fourth amplitude information, the candidate compression parameter λ of the U channel can be obtained. U1 .For example:
[0173] λ(i)=|A Un (i)| / |A Unr (i)| (7)
[0174] Furthermore, the average value of λ(i) is used as the candidate compression parameter λ corresponding to the currently calculated DCT coefficient group. U1 .
[0175] Optionally, λ(i) = |A Unr (i)| / |A Un (i)|, then the average of the reciprocals of λ(i) can be used as the candidate compression parameter λ U1 .
[0176] In this way, based on the above process, the U channel candidate compression parameters λ corresponding to each DCT coefficient group can be obtained. U1 ,λ U2 , ..., λ UX .
[0177] Step 902: Determine a V channel candidate compression parameter according to an average value of a ratio of fifth amplitude information of a fifth reference AC coefficient to sixth amplitude information of a sixth reference AC coefficient.
[0178] The process of determining the candidate compression parameters of the V channel according to the ratio of the fifth amplitude information of the fifth reference AC coefficient to the sixth amplitude information of the sixth reference AC coefficient is similar to the process of determining the candidate compression parameters of the U channel according to the ratio of the third amplitude information of the third reference AC coefficient to the fourth amplitude information of the fourth reference AC coefficient, and will not be repeated here, and the above process may be referred to.
[0179] In this way, the V channel candidate compression parameter λ corresponding to each DCT coefficient group can be calculated based on the ratio of the fifth amplitude information and the sixth amplitude information. V1 ,λ V2 , ..., λ VX .
[0180] Step 903: Take the average of the U channel candidate compression parameter and the V channel candidate compression parameter as the candidate compression parameter.
[0181] For each DCT coefficient group, take the average of the corresponding U channel candidate compression parameter and V channel candidate compression parameter to obtain the corresponding candidate compression parameter. In this way, multiple candidate compression parameters λ1, λ2..., λ x .
[0182] The compression parameter λ can be obtained by taking the average value of each candidate compression parameter:
[0183]
[0184] In this way, the determined threshold parameters and compression parameters can be stored in the electronic device and used for filtering processing on the DCT coefficient matrix during DCT noise reduction processing.
[0185] Optionally, calculate λ U1 ,λ U2 , ..., λ Ux The mean of λ can be obtained U , and U As the compression parameter of the U channel image of the target image, filter processing is performed; calculate λ V1 ,λ V2 , ..., λ Vx The average value of V , and V The filter processing is performed as the compression parameter of the V channel image of the target image.
[0186] In an embodiment of the present application, a time domain noise reduction method is used to process several frames of images taken continuously to obtain a clean image without noise. The DCT frequency domain coefficients of the clean image and the noisy image are compared to obtain the threshold parameters of the Y image and the compression parameters of the UV image. In this way, noise reduction processing can be performed based on the filter parameters. Since the RGB image is transformed into a YUV image for noise reduction, the color correlation is removed, and the RGB image has a better processing effect, thereby improving the noise reduction processing effect. A clean image is generated by a time domain noise reduction method, and by comparing it with a noisy image, the noise of the image is relatively easy to measure. Therefore, it is only necessary to compare the local image blocks of several different areas of the clean image and the noisy image to obtain the processing method of the DCT coefficient, which is simple and efficient.
[0187] For example, a group of image noise reduction comparison diagrams are shown in FIG10 . Fig.10a is the original noisy image, Fig.10b is the denoised image after time domain denoising. Fig.10c The denoised image is obtained by performing DCT denoising processing based on the target sliding window parameters and filter parameters provided in the present application, wherein T=102.22, λ=25.98, FilterSize=(16,16, Stride=(8,8). It can be seen that the method provided in the present application can obtain a good denoising effect with a small amount of calculation.
[0188] The above describes the determination of the filtering parameters. The following describes the process of performing filtering based on the filtering parameters.
[0189] Please refer to Fig.11 , which shows a schematic diagram of a process of filtering DCT coefficients provided by an embodiment of the present application. Filtering DCT coefficients in a DCT coefficient matrix according to preset filtering parameters includes:
[0190] Step 1101, determining a target DCT coefficient from a DCT coefficient matrix according to a noise reduction target corresponding to a target image.
[0191] Step 1102: Filter the target DCT coefficients based on the filtering parameters.
[0192] Specifically, the denoising target may be related to the denoising intensity expectation and texture feature retention degree for the target image.
[0193] In an optional embodiment of the present application, the DCT coefficient matrix includes DC coefficients and AC coefficients, and the target DCT coefficients are determined from the DCT coefficient matrix according to the noise reduction target corresponding to the target image, including: if the noise reduction target is that the noise reduction intensity of the target image meets the preset intensity condition, then the AC coefficient is used as the target DCT coefficient.
[0194] If the desired denoising intensity is relatively large, that is, the denoising target is that the denoising intensity of the target image satisfies a preset intensity condition, then the AC coefficient can be used as the target DCT coefficient.
[0195] In another optional embodiment of the present application, the DCT coefficients include DC coefficients and AC coefficients, and the target DCT coefficients are determined from the DCT coefficient matrix according to the noise reduction target corresponding to the target image, including: if the noise reduction target is to retain the low-frequency texture features in the target image and remove the noise in the target image, then the other AC coefficients other than the first AC coefficient and the second AC coefficient adjacent to the DC coefficient are used as the target DCT coefficients.
[0196] Among them, Figure 5 It can be seen that the upper left corner of the DCT coefficient matrix is a low-frequency coefficient. Therefore, if the denoising goal is to remove noise while retaining some low-frequency textures in the image, the DC coefficient and the two AC coefficients adjacent to the DC coefficient can be removed, and only the other AC coefficients can be filtered.
[0197] In another optional embodiment of the present application, all AC coefficients in the DCT coefficient matrix of the Y channel image corresponding to the target image and other AC coefficients other than the two AC coefficients adjacent to the DC coefficients in the DCT coefficient matrix of the UV channel image corresponding to the target image can also be used as target DCT coefficients.
[0198] In the embodiment of the present application, based on different noise reduction targets, different DCT coefficients are filtered to ensure the noise reduction efficiency while meeting different noise reduction needs, improve the flexibility of noise reduction processing, meet the noise reduction requirements, and improve the noise reduction quality.
[0199] Furthermore, after obtaining each local denoised image block, a denoised image corresponding to the target image after denoising processing can be obtained through aggregation reconstruction. The process is described below.
[0200] In one embodiment, Fig.12 FIG. 1 is a flow chart of determining a denoised image according to an embodiment of the present application. Obtaining a denoised image after denoising corresponding to a target image according to multiple denoised local image blocks includes:
[0201] Step 1201, determine a non-overlapping area and an overlapping area based on multiple denoised local image blocks. The overlapping area is an image area formed by overlapping multiple target denoised local image blocks, and the non-overlapping area is an image area formed by a single denoised local image block.
[0202] Since Stride is smaller than FilterSize in the corresponding direction of the image block, there will be overlaps between the denoised local image blocks. Take FilterSize = (16,16) and Stride = (8,8) as an example for analysis. Fig.13 As shown in the figure, the overlapping area is composed of four overlapping local denoising image blocks, with a size of 8*8 pixels. For the non-overlapping area, the final pixel value is obtained after the inverse DCT transform. For each pixel point in the overlapping area, it needs to be recalculated.
[0203] Step 1202, calculating the pixel value of each pixel point corresponding to the overlapping area.
[0204] In one embodiment, the pixel value of each pixel point corresponding to the overlapping area can be obtained by using interpolation method and weighted average processing. Specifically, calculating the pixel value of each pixel point corresponding to the overlapping area includes: using interpolation method to determine the weight value of each target denoising local image block for the overlapping area; based on each weight value and the pixel value corresponding to each target denoising local image block, performing weighted average processing to obtain the pixel value of each pixel point corresponding to the overlapping area.
[0205] Among them, continue to refer to Fig.13 , the center of each denoised local image block is regarded as the position of the block, corresponding to the four vertices 1 to 4 in the figure. Obviously, the distances from most of the pixels in the overlapping area to these four vertices are different. Theoretically, the closer the denoised local image block is to the target pixel, the more it contributes to the pixel. In the prior art, during aggregation reconstruction, for the same pixel in the overlapping area, the values from four different image blocks are simply averaged, which is equivalent to assuming that the contributions of the four image blocks to the final result are the same, resulting in inaccurate final results.
[0206] In the embodiment of the present application, an interpolation algorithm such as bilinear interpolation or inverse distance weighted interpolation is used to obtain the weights of different target denoised local image blocks in the overlapping area, and based on the weights, a weighted average process is performed to obtain the pixel values of each pixel point corresponding to the overlapping area. The target denoised local image is each denoised local image block covering the overlapping area.
[0207] Exemplarily, the final pixel value f(x, y) of the image in the overlapping area can be expressed as:
[0208]
[0209] Among them, W i (x, y) is the weight of each denoised local image block. (x, y) is the pixel coordinate of the entire target image. (p(i), q(i)) is the coordinate in the denoised local image block, f i (p(i), q(i)) are the values obtained in the corresponding denoised local image block. n is the number of overlapping image blocks at the (x, y) coordinates.
[0210] Step 1203: obtaining a denoised image according to the pixel value of each pixel point corresponding to the non-overlapping area and the pixel value of each pixel point corresponding to the overlapping area.
[0211] The pixel values of each pixel point corresponding to the non-overlapping area and the pixel values of each pixel point corresponding to the overlapping area are aggregated to form the final denoised image.
[0212] In the embodiment of the present application, the interpolation method is used to obtain the weights of different image blocks during aggregation reconstruction, which is more accurate than the mean method in the prior art, ensuring the accuracy of the pixel values of each area in the target image, thereby effectively ensuring the overall noise reduction quality of the image.
[0213] In one embodiment, by combining the DCT coefficient processing method with the overlapping image block synthesis method, six different noise reduction schemes can be obtained in this embodiment. Table 5 shows the PSNRs corresponding to the six schemes.
[0214] (Table 5)
[0215] DCT noise reduction solution PSNR 1. DC coefficient of YUV image remains unchanged + bilinear interpolation 26.90 2. DC coefficient of YUV image remains unchanged + inverse distance weighted interpolation 26.85 3. The three coefficients in the upper left corner of the YUV image remain unchanged + bilinear interpolation 26.59 4. The three coefficients in the upper left corner of the YUV image remain unchanged + inverse distance weighted interpolation 26.58 5. The 3 coefficients in the upper left corner of the Y image remain unchanged + bilinear interpolation 26.88 6. The 3 coefficients in the upper left corner of the Y image remain unchanged + inverse distance weighted interpolation 26.83
[0216] Among them, the DC coefficient remains unchanged means keeping the DC coefficient unchanged, and the three coefficients in the upper left corner remain unchanged means keeping the DC coefficient and the two AC coefficients adjacent to the DC coefficient unchanged.
[0217] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0218] Based on the same inventive concept, the embodiment of the present application also provides an image noise reduction processing device for implementing the above-mentioned image noise reduction processing method. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above-mentioned method, so the specific limitations in one or more image noise reduction processing device embodiments provided below can refer to the limitations of the image noise reduction processing method above, and will not be repeated here.
[0219] In one embodiment, Fig.14 As shown, an image noise reduction processing device is provided, and the image noise reduction processing device 1400 includes: an acquisition module 1401, a sliding window module 1402, a noise reduction module 1403 and a determination module 1404, wherein:
[0220] An acquisition module 1401 is used to acquire a target image to be subjected to noise reduction processing;
[0221] A sliding window module 1402 is used to perform sliding window processing on the target image according to a target sliding window parameter to obtain a plurality of local image blocks, wherein the target sliding window parameter is determined from a sliding window parameter database according to at least one of noise reduction speed requirement information and image detail information corresponding to the target image, and the sliding window parameter database includes a plurality of sliding window parameters;
[0222] A denoising module 1403 is configured to perform DCT denoising processing on each of the local image blocks to obtain a plurality of denoised local image blocks, wherein the DCT denoising processing on each local image block and the sliding window processing on the target image according to the target sliding window parameters are performed alternately;
[0223] The determination module 1404 is configured to obtain a denoised image corresponding to the target image after denoising according to the multiple denoised local image blocks.
[0224] In one embodiment, the target sliding window parameter includes a size parameter and a stride parameter, and the sliding window module 1402 is specifically configured to: based on the stride parameter, slide from the target image to obtain a plurality of local image blocks matching the size parameter.
[0225] In one embodiment, the noise reduction module 1403 is specifically used to: for each local image block, perform DCT transformation processing on the local image block to obtain a DCT coefficient matrix, filter the DCT coefficients in the DCT coefficient matrix according to preset filtering parameters, and perform inverse DCT transformation processing on the filtered DCT coefficient matrix to obtain the denoised local image block.
[0226] In one embodiment, the noise reduction module 1403 is specifically used to: determine the target DCT coefficient from the DCT coefficient matrix according to the noise reduction target corresponding to the target image; and perform filtering processing on the target DCT coefficient based on the filtering parameter.
[0227] In one embodiment, the DCT coefficient matrix includes DC coefficients and AC coefficients, and the noise reduction module 1403 is specifically used to: if the noise reduction target is to retain the low-frequency texture features in the target image and remove the noise in the target image, then the AC coefficient is used as the target DCT coefficient.
[0228] In one embodiment, the DCT coefficient includes a DC coefficient and an AC coefficient, and the noise reduction module 1403 is specifically used to: if the noise reduction target is that the noise reduction intensity of the target image meets the preset intensity condition, then the other AC coefficients in the AC coefficient other than the first AC coefficient and the second AC coefficient adjacent to the DC coefficient are used as the target DCT coefficient.
[0229] In one embodiment, the device further comprises:
[0230] The parameter determination module is used to obtain multiple scene images taken by continuous exposure, and determine a reference noise image from the multiple scene images; perform time domain noise reduction processing on the reference image to obtain a reference denoised image; convert the reference noise image and the reference denoised image into YUV images to obtain a YUV noise image and a YUV denoised image; and obtain the filtering parameters according to the YUV noise image and the YUV denoised image.
[0231] In one of the embodiments, the parameter determination module is specifically used to: perform sliding window processing on the YUV noise image and the YUV denoised image respectively to obtain multiple noise image blocks and multiple denoised image blocks, and perform DCT transformation processing on each noise image block and each denoised image block to obtain multiple noise DCT coefficient matrices and multiple denoised DCT coefficient matrices; determine the filtering parameters according to the AC coefficients in the multiple noise DCT coefficient matrices and the AC coefficients in the multiple denoised DCT coefficient matrices.
[0232] In one embodiment, the filtering parameters include threshold parameters, and a parameter determination module is specifically used to: determine multiple DCT coefficient groups from the multiple noise DCT coefficient matrices and the multiple denoising DCT coefficient matrices, each DCT coefficient group includes a noise DCT coefficient matrix and a denoising DCT coefficient matrix corresponding to the same local image area; for each DCT coefficient group, use the noise DCT coefficient matrix corresponding to the Y channel in the DCT coefficient group as the first reference AC coefficient, and the denoising DCT coefficient matrix corresponding to the Y channel as the second reference AC coefficient, and determine a candidate threshold parameter based on the first reference AC coefficient and the second reference AC coefficient; determine the threshold parameter according to each candidate threshold parameter.
[0233] In one embodiment, the parameter determination module is specifically used to: obtain first amplitude information of the first reference AC coefficient and second amplitude information of the second reference AC coefficient; and determine the candidate threshold parameter according to the first amplitude information and the second amplitude information.
[0234] In one embodiment, the parameter determination module is specifically used to: obtain the sub-amplitudes corresponding to the first amplitude information and the second amplitude information respectively, and determine the absolute value of the difference between the sub-amplitudes; obtain the maximum value among the absolute values; determine the first target sub-amplitude of the corresponding first amplitude information and the second target sub-amplitude of the second amplitude information according to the maximum value; and use the maximum value between the absolute value of the first target sub-amplitude and the absolute value of the second target sub-amplitude as a candidate threshold parameter.
[0235] In one embodiment, the filtering parameters include compression parameters, and a parameter determination module is specifically used to: for each DCT coefficient group, use the noise DCT coefficient matrix corresponding to the U channel in the DCT coefficient group as the third reference AC coefficient, the denoised DCT coefficient matrix corresponding to the U channel as the fourth reference AC coefficient, the noise DCT coefficient matrix corresponding to the V channel as the fifth reference AC coefficient, and the denoised DCT coefficient matrix corresponding to the V channel as the sixth reference AC coefficient, and determine the candidate compression parameter based on the third reference AC coefficient, the fourth reference AC coefficient, the fifth reference AC coefficient and the sixth reference AC coefficient; determine the candidate parameter according to each candidate compression parameter.
[0236] In one embodiment, the parameter determination module is specifically used to: determine the U channel candidate compression parameter according to the average value of the ratio of the third amplitude information of the third reference AC coefficient to the fourth amplitude information of the fourth reference AC coefficient; determine the V channel candidate compression parameter according to the average value of the ratio of the fifth amplitude information of the fifth reference AC coefficient to the sixth amplitude information of the sixth reference AC coefficient; and use the average of the U channel candidate compression parameter and the V channel candidate compression parameter as the candidate compression parameter.
[0237] In one embodiment, the determination module 1404 is specifically used to: determine a non-overlapping area and an overlapping area based on the multiple denoising local image blocks, the overlapping area is an image area formed by overlapping multiple target denoising local image blocks, and the non-overlapping area is an image area formed by a single denoising local image block; calculate the pixel value of each pixel point corresponding to the overlapping area; and obtain the denoised image based on the pixel value of each pixel point corresponding to the non-overlapping area and the pixel value of each pixel point corresponding to the overlapping area.
[0238] In one embodiment, the determination module 1404 is specifically used to: determine the weight value of each target denoising local image block for the overlapping area by using the interpolation method; perform weighted averaging processing based on each weight value and the pixel value corresponding to each target denoising local image block to obtain the pixel value of each pixel point corresponding to the overlapping area.
[0239] Each module in the above-mentioned image noise reduction processing device can be implemented in whole or in part by software, hardware or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0240] In one embodiment, an electronic device is provided. The electronic device may be a terminal, and its internal structure diagram may be as follows: Fig.15As shown. The electronic device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the electronic device is used to exchange information between the processor and the external device. The communication interface of the electronic device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, an image noise reduction processing method is implemented. The display unit of the electronic device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the electronic device casing, or an external keyboard, touchpad or mouse.
[0241] Those skilled in the art will understand that Fig.15 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0242] In one embodiment, an electronic device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0243] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0244] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0245] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0246] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0247] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0248] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. An image noise reduction processing method, characterized in that: The method comprises: Acquire a target image to be subjected to noise reduction processing; Performing sliding window processing on the target image according to a target sliding window parameter to obtain a plurality of local image blocks, wherein the target sliding window parameter is determined from a sliding window parameter database according to at least one of noise reduction speed requirement information and image detail information corresponding to the target image, and the sliding window parameter database includes a plurality of sliding window parameters; Performing DCT denoising processing on each of the local image blocks to obtain a plurality of denoised local image blocks; wherein the performing DCT denoising processing on each of the local image blocks and the performing sliding window processing on the target image according to the target sliding window parameters are performed alternately; A denoised image after denoising corresponding to the target image is obtained according to the multiple denoised local image blocks.
2. The method according to claim 1, characterized in that The target sliding window parameters include a size parameter and a stride parameter, and the target image is subjected to sliding window processing according to the target sliding window parameters to obtain a plurality of local image blocks, including: A plurality of local image blocks matching the size parameter are obtained by sliding from the target image based on the stride parameter.
3. The method according to claim 1, characterized in that The performing DCT noise reduction processing on each of the local image blocks comprises: For each of the local image blocks, DCT transform processing is performed on the local image block to obtain a DCT coefficient matrix, the DCT coefficients in the DCT coefficient matrix are filtered according to preset filtering parameters, and the filtered DCT coefficient matrix is inversely transformed to obtain the denoised local image block.
4. The method according to claim 3, characterized in that The filtering process on the DCT coefficients in the DCT coefficient matrix according to the preset filtering parameters includes: Determining a target DCT coefficient from the DCT coefficient matrix according to a noise reduction target corresponding to the target image; The target DCT coefficients are filtered based on the filtering parameters.
5. The method according to claim 4, characterized in that The DCT coefficient matrix includes a DC coefficient and an AC coefficient, and determining a target DCT coefficient from the DCT coefficient matrix according to a noise reduction target corresponding to the target image includes: If the denoising target is that the denoising intensity of the target image satisfies a preset intensity condition, the AC coefficient is used as the target DCT coefficient.
6. The method according to claim 4, characterized in that The DCT coefficients include DC coefficients and AC coefficients, and determining target DCT coefficients from the DCT coefficient matrix according to the noise reduction target corresponding to the target image includes: If the noise reduction target is to retain the low-frequency texture features in the target image and remove the noise in the target image, the other AC coefficients among the AC coefficients except the first AC coefficient and the second AC coefficient adjacent to the DC coefficient are used as the target DCT coefficients.
7. The method according to any one of claims 3 to 6, characterized in that: The method further comprises: Acquire a plurality of scene images taken by continuous exposure, and determine a reference noise image from the plurality of scene images; Performing time domain noise reduction processing on the reference noisy image to obtain a reference denoised image; Convert the reference noise image and the reference denoised image into YUV images to obtain a YUV noise image and a YUV denoised image; The filtering parameters are obtained according to the YUV noise image and the YUV denoised image.
8. The method according to claim 7, characterized in that The obtaining the filtering parameters according to the YUV noise image and the YUV denoised image includes: Performing sliding window processing on the YUV noise image and the YUV denoised image respectively to obtain a plurality of noise image blocks and a plurality of denoised image blocks, and performing DCT transformation processing on each of the noise image blocks and each of the denoised image blocks to obtain a plurality of noise DCT coefficient matrices and a plurality of denoised DCT coefficient matrices; The filtering parameters are determined according to the AC coefficients in the multiple noise DCT coefficient matrices and the AC coefficients in the multiple denoising DCT coefficient matrices.
9. The method according to claim 8, characterized in that The filtering parameters include threshold parameters, and the determining of the filtering parameters according to the AC coefficients in the multiple noise DCT coefficient matrices and the AC coefficients in the multiple denoising DCT coefficient matrices includes: Determine a plurality of DCT coefficient groups from the plurality of noise DCT coefficient matrices and the plurality of denoising DCT coefficient matrices, each of the DCT coefficient groups comprising a noise DCT coefficient matrix and a denoising DCT coefficient matrix corresponding to the same local image region; For each of the DCT coefficient groups, using the noise DCT coefficient matrix corresponding to the Y channel in the DCT coefficient group as a first reference AC coefficient, and the denoised DCT coefficient matrix corresponding to the Y channel as a second reference AC coefficient, and determining a candidate threshold parameter based on the first reference AC coefficient and the second reference AC coefficient; The threshold parameter is determined according to each of the candidate threshold parameters.
10. The method according to claim 9, characterized in that The determining of a candidate threshold parameter based on the first reference AC coefficient and the second reference AC coefficient comprises: Acquire first amplitude information of the first reference AC coefficient and second amplitude information of the second reference AC coefficient; Obtaining sub-amplitudes corresponding to the first amplitude information and the second amplitude information, respectively, and determining an absolute value of a difference between the sub-amplitudes; Obtaining the maximum value among the absolute values; Determine a first target sub-amplitude of the first amplitude information and a second target sub-amplitude of the second amplitude information corresponding to the maximum value; The maximum value between the absolute value of the first target sub-amplitude and the absolute value of the second target sub-amplitude is used as the candidate threshold parameter.
11. The method according to claim 9, characterized in that The filtering parameters include compression parameters, and determining the filtering parameters according to the AC coefficients in the multiple noise DCT coefficient matrices and the AC coefficients in the multiple denoising DCT coefficient matrices includes: For each of the DCT coefficient groups, using the noise DCT coefficient matrix corresponding to the U channel in the DCT coefficient group as the third reference AC coefficient, the denoised DCT coefficient matrix corresponding to the U channel as the fourth reference AC coefficient, the noise DCT coefficient matrix corresponding to the V channel as the fifth reference AC coefficient, and the denoised DCT coefficient matrix corresponding to the V channel as the sixth reference AC coefficient, and determining the candidate compression parameter based on the third reference AC coefficient, the fourth reference AC coefficient, the fifth reference AC coefficient, and the sixth reference AC coefficient; The candidate parameter is determined according to each of the candidate compression parameters.
12. The method according to claim 11, characterized in that The determining of the candidate compression parameter based on the third reference AC coefficient, the fourth reference AC coefficient, the fifth reference AC coefficient, and the sixth reference AC coefficient comprises: Determine a U channel candidate compression parameter according to an average value of a ratio of the third amplitude information of the third reference AC coefficient to the fourth amplitude information of the fourth reference AC coefficient; Determine a V channel candidate compression parameter according to an average value of a ratio of the fifth amplitude information of the fifth reference AC coefficient to the sixth amplitude information of the sixth reference AC coefficient; The average of the U channel candidate compression parameter and the V channel candidate compression parameter is used as the candidate compression parameter.
13. The method according to claim 1, characterized in that The step of obtaining a denoised image corresponding to the target image after denoising according to the multiple denoised local image blocks comprises: Determine a non-overlapping area and an overlapping area according to the multiple denoised local image blocks, the overlapping area is an image area formed by overlapping multiple target denoised local image blocks, and the non-overlapping area is an image area formed by a single denoised local image block; Calculate the pixel value of each pixel point corresponding to the overlapping area; The denoised image is obtained according to the pixel value of each pixel point corresponding to the non-overlapping area and the pixel value of each pixel point corresponding to the overlapping area.
14. The method according to claim 13, characterized in that The calculating the pixel value of each pixel point corresponding to the overlapping area includes: Determine the weight value of each of the target denoising local image blocks for the overlapping area by using an interpolation method; Based on each of the weight values and the pixel values corresponding to each of the target denoising local image blocks, weighted averaging processing is performed to obtain the pixel value of each pixel point corresponding to the overlapping area.
15. An image noise reduction processing device, characterized in that: The device comprises: An acquisition module, used for acquiring a target image to be subjected to noise reduction processing; a sliding window module, configured to perform sliding window processing on the target image according to a target sliding window parameter to obtain a plurality of local image blocks, wherein the target sliding window parameter is determined from a sliding window parameter database according to at least one of noise reduction speed requirement information and image detail information corresponding to the target image, and the sliding window parameter database includes a plurality of sliding window parameters; A denoising module, configured to perform DCT denoising processing on each of the local image blocks to obtain a plurality of denoised local image blocks; wherein the DCT denoising processing on each of the local image blocks and the sliding window processing on the target image according to the target sliding window parameters are performed alternately; A determination module is used to obtain a denoised image after denoising corresponding to the target image according to the multiple denoised local image blocks.
16. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 14 are implemented.
17. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 14 are implemented.
18. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 14 are implemented.
