CN-115546038-B - Image noise reduction method, circuit, electronic device and storage medium
Abstract
The present disclosure relates to an image noise reduction method, a circuit, an electronic device, and a storage medium. The image noise reduction method comprises the steps of obtaining a pixel data array output by an image sensor, moving a matrix window in the pixel data array according to a preset clock period to obtain a first pixel data matrix until the pixel data array is traversed, carrying out wavelet noise reduction on target pixel data in the first pixel data matrix in each clock period to obtain a second pixel data matrix, outputting central pixel data in the second pixel data matrix, and updating the second pixel data matrix into the pixel data array.
Inventors
- LV YUPENG
- YAO HUIJUN
Assignees
- 比亚迪半导体股份有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20210630
Claims (10)
- 1. A method of image denoising, comprising: acquiring a pixel data array output by an image sensor; Moving a matrix window of M x N in the pixel data array according to a preset clock period to obtain a first pixel data matrix until the pixel data array is traversed, wherein M is the number of rows of the matrix window, N is the number of columns of the matrix window, and M and N are odd numbers; In each clock period, carrying out noise reduction processing on the first pixel data matrix to obtain a second pixel data matrix, outputting central pixel data in the second pixel data matrix, and updating the second pixel data matrix into the pixel data array so that target pixel data can be subjected to noise reduction processing for a plurality of times, wherein the target pixel data is pixel data corresponding to a target channel type in the first pixel data matrix, and the target channel type is a channel type corresponding to the central pixel data of the first pixel data matrix; The method comprises the step of carrying out noise reduction processing on the first pixel data matrix to obtain a second pixel data matrix, and the step of carrying out wavelet noise reduction processing on the target pixel data in the first pixel data matrix.
- 2. The method of claim 1, wherein denoising the first matrix of pixel data to obtain the second matrix of pixel data comprises: Randomly extracting target pixel data in a first pixel data matrix to form at least one original wavelet transform group containing L target pixel data; For any original wavelet transformation group, respectively and sequentially performing wavelet forward transformation processing, threshold denoising processing and wavelet inverse transformation processing to obtain a reconstructed wavelet transformation group; Updating the target pixel data in the first pixel data matrix based on the at least one reconstructed wavelet transform set to obtain a second pixel data matrix.
- 3. The method of claim 2, wherein updating the target pixel data in the first pixel data matrix to obtain the second pixel data matrix based on the at least one reconstructed wavelet transform set comprises: And calculating an average value of the same target pixel data in different reconstruction wavelet transformation sets, and updating the same target pixel data in the first pixel data matrix to the average value.
- 4. The method of claim 2, wherein updating the target pixel data in the first pixel data matrix to obtain the second pixel data matrix based on the at least one reconstructed wavelet transform set comprises: And calculating a weighted average value of the same target pixel data in different reconstruction wavelet transformation groups according to the weights of the reconstruction wavelet transformation groups, and updating the same target pixel data in a first pixel data matrix to the weighted average value, wherein if the original wavelet transformation group contains more updated target pixel data, the weight of the corresponding reconstruction wavelet transformation group is larger.
- 5. The method according to claim 2, wherein L is 4, and sequentially performing a wavelet forward transform process, a threshold denoising process, and a wavelet inverse transform process on the original wavelet transform set to obtain a reconstructed wavelet transform set, comprises: A= (a1+a2+a3+a4)/4, h= (a1+a3-a2-A4)/2, v= (a1+a2-A3-A4)/2, d=a1+a4-A2-A3, said A, H, V, D being an intermediate quantity, said A1, A2, A3, A4 being values of target element data in the original wavelet transform set; if H is less than or equal to Y1, setting H to zero or setting H to H ', wherein H' is the product of H and X1, X1 is a preset coefficient, 0< X1<1, Y1 is a preset threshold; If V is less than or equal to Y2, setting V to zero or setting V to V ', wherein V' is the product of V and X2, X2 is a preset coefficient, 0< X2<1, Y2 is a preset threshold; If D is less than or equal to Y3, setting D to zero or setting D to D ', wherein D' is the product of D and X3, X3 is a preset coefficient and 0< X3<1, Y3 is a preset threshold; a1 '=a+v/2+H/2+D/4, A2' =a+v/2-H/2-D/4, A3 '=a-V/2+H/2-D/4, A4' =a-V/2-H/2+D/4, the A1', A2', A3', A4' being values reconstructing the target element data in the wavelet transform set.
- 6. The method of claim 1, wherein prior to moving a matrix window of M x N in the pixel data array at a preset clock period to read a first pixel data matrix, the method further comprises: P3 row blank elements are respectively filled outside the outermost rows of the pixel data array, Q3 column blank elements are respectively filled outside the outermost columns of the pixel data array, so that the pixel data array is expanded from original P1 rows and Q1 columns to P2 rows and Q2 columns, wherein P2=P1+M-1, Q2=Q1+N-1, P3= (M-1)/2, and Q3= (N-1)/2.
- 7. The method of claim 1, wherein the pixel data array is a bayer pixel data array, and wherein M and N are each 5.
- 8. An image noise reduction circuit is characterized by comprising a clock source and a processing unit; The clock source is used for sending a clock signal to the processing unit according to a preset clock period; The processing unit is used for receiving a clock signal, moving a matrix window of M x N in a pixel data array according to the clock period to obtain a first pixel data matrix until the pixel data array is traversed, wherein M is the number of rows of the matrix window, N is the number of columns of the matrix window, M and N are odd numbers, and in each clock period, denoising the first pixel data matrix to obtain a second pixel data matrix, outputting central pixel data in the second pixel data matrix and updating the second pixel data matrix into the pixel data array so that target pixel data can be subjected to denoising processing for a plurality of times, wherein the target pixel data is pixel data corresponding to a target channel type in the first pixel data matrix, the target channel type is the channel type corresponding to the central pixel data of the first pixel data matrix, and denoising the first pixel data matrix to obtain the second pixel data matrix comprises wavelet denoising the target pixel data in the first pixel data matrix.
- 9. An electronic device comprising a processor, a memory, and a program or instruction stored on the memory and executable on the processor; The program or instructions, when executed by the processor, implement the steps of the method of any of claims 1-7.
- 10. A readable storage medium, characterized in that it stores thereon a program or instructions, which when executed by a processor, implement the steps of the method according to any of claims 1-7.
Description
Image noise reduction method, circuit, electronic device and storage medium Technical Field The disclosure belongs to the technical field of images, and particularly relates to an image noise reduction method, an image noise reduction circuit, electronic equipment and a storage medium. Background CMOS image sensors are used on a large scale due to their high integration level, strong anti-interference capability, low power consumption and manufacturing technology, however, CMOS image sensors are still affected by image noise, and the noise level of the image directly affects the quality of the image, limiting the image accuracy. With increasing requirements for imaging quality, noise suppression for CMOS image sensors has become a focus, and thus a new noise reduction processing method has been required. Disclosure of Invention An object of an embodiment of the present disclosure is to provide an image noise reduction method, an image noise reduction circuit, an electronic device, and a storage medium, so as to implement noise reduction processing on an image. In a first aspect, embodiments of the present disclosure provide an image denoising method, The image denoising method comprises the following steps: acquiring a pixel data array output by an image sensor; Moving a matrix window of M x N in the pixel data array according to a preset clock period to obtain a first pixel data matrix until the pixel data array is traversed, wherein M is the number of rows of the matrix window, N is the number of columns of the matrix window, and M and N are odd numbers; in each clock period, carrying out noise reduction processing on the first pixel data matrix to obtain a second pixel data matrix, outputting central pixel data in the second pixel data matrix and updating the second pixel data matrix into the pixel data array; The method comprises the steps of carrying out wavelet noise reduction processing on target pixel data in a first pixel data matrix, wherein the target pixel data is pixel data corresponding to a target channel type in the first pixel data matrix, and the target channel type is channel type corresponding to central pixel data of the first pixel data matrix. Optionally, the noise reduction processing is performed on the first pixel data matrix to obtain a second pixel data matrix, including: Randomly extracting target pixel data in a first pixel data matrix to form at least one original wavelet transform group containing L target pixel data; For any original wavelet transformation group, respectively and sequentially performing wavelet forward transformation processing, threshold denoising processing and wavelet inverse transformation processing to obtain a reconstructed wavelet transformation group; Updating the target pixel data in the first pixel data matrix based on the at least one reconstructed wavelet transform set to obtain a second pixel data matrix. Optionally, updating the target pixel data in the first pixel data matrix to obtain the second pixel data matrix based on the at least one reconstructed wavelet transform set includes: And calculating an average value of the same target pixel data in different reconstruction wavelet transformation sets, and updating the same target pixel data in the first pixel data matrix to the average value. Optionally, updating the target pixel data in the first pixel data matrix to obtain the second pixel data matrix based on the at least one reconstructed wavelet transform set includes: And calculating a weighted average value of the same target pixel data in different reconstruction wavelet transformation groups according to the weights of the reconstruction wavelet transformation groups, and updating the same target pixel data in a first pixel data matrix to the weighted average value, wherein if the original wavelet transformation group contains more updated target pixel data, the weight of the corresponding reconstruction wavelet transformation group is larger. Optionally, the L is 4, and performing wavelet forward transform processing, threshold denoising processing, and wavelet inverse transform processing on the original wavelet transform set in order to obtain a reconstructed wavelet transform set, including: A= (a1+a2+a3+a4)/4, h= (a1+a3-a2-A4)/2, v= (a1+a2-A3-A4)/2, d=a1+a4-A2-A3, said A, H, V, D being an intermediate quantity, said A1, A2, A3, A4 being values of target element data in the original wavelet transform set; if H is less than or equal to Y1, setting H to zero or setting H to H ', wherein H' is the product of H and X1, X1 is a preset coefficient, 0< X1<1, Y1 is a preset threshold; If V is less than or equal to Y2, setting V to zero or setting V to V ', wherein V' is the product of V and X2, X2 is a preset coefficient, 0< X2<1, Y2 is a preset threshold; If D is less than or equal to Y3, setting D to zero or setting D to D ', wherein D' is the product of D and X3, X3 is a preset coefficient and 0< X3<1, Y3 is a preset threshold; a1 '=a