Background
The quality of an image preprocessing algorithm directly relates to the effect of subsequent image processing, such as image segmentation, target recognition, edge extraction and the like, in order to obtain a high-quality digital image, the image needs to be subjected to noise reduction processing in many times, the integrity (namely main characteristics) of original information is kept as much as possible, and meanwhile useless information in a signal can be removed.
The image noise points are divided into random noise points and sensor noise points, the random noise points are easy to remove, and the sensor noise points are difficult to remove. If the imaging machine is exposed to light for a long time, thermal noise is generated, resulting in poor imaging quality.
The image denoising algorithms commonly used in the past can be roughly classified into two categories, namely a spatial pixel characteristic denoising algorithm and a transform domain denoising algorithm. The former is directly processed in an image space, and the latter is indirectly processed in an image transform domain, the former has a Non-Local means (NLM) algorithm, and the latter has a wavelet noise reduction algorithm, while the current most excellent BM3D algorithm has the characteristics of both space domain and transform domain noise reduction, and although the algorithm is excellent, the algorithm consumes a long time, and cannot meet the requirements of real-time application.
Disclosure of Invention
The application provides a method and a system for rapidly realizing image noise reduction based on BIB3D, so as to rapidly reduce image noise and improve image quality, and even an image with poor image quality obtained under a high ISO condition of a machine under low light can be effectively improved.
The algorithm is divided into two phases. The first stage performs BIB3D polymerization noise reduction. Firstly, reading an image, taking out a part (small block) from the image, then generating a plurality of large blocks (big blocks) containing the small block, respectively carrying out transform domain transformation (such as discrete transformation, wavelet transformation and the like) on the big blocks, carrying out hard threshold noise reduction, then carrying out corresponding inverse transformation to obtain the big blocks after noise reduction, then taking out the corresponding small block from each big block, then calculating the average value with or without weight of the small block in each big block to obtain the final value of the small block, and circulating the process until the whole image is traversed to finish the first stage.
And in the second stage, wiener noise reduction is carried out. Circularly extracting a small block from an original image, then generating a plurality of big blocks (big blocks) containing the small block and the noise-reduced big blocks at the same position obtained in the first stage, carrying out frequency domain transformation on the noise-reduced big blocks to obtain the power spectrum of the big blocks, dividing the power spectrum by the power spectrum added with the interference factors to obtain reduced wiener factors, then carrying out corresponding frequency domain transformation on each corresponding big block in the original noise image, multiplying the wiener factors obtained above, then carrying out corresponding inverse transformation to obtain the noise-reduced big blocks, then taking out the small blocks at the same position (each big block obtains different noise-reduction results of the small block), and then obtaining the average value with or without weight values of all the obtained noise-reduction results to obtain the final noise-reduction result of the small block. And circularly implementing the above processes until the whole image is traversed to obtain the final noise reduction image.
The algorithm comprises a plurality of implementation methods and a plurality of parameters, when the scale of small block blocks is set to be large, the algorithm with a small number of big block blocks can be rapidly implemented, and an acceptable noise reduction effect can be obtained, so that the requirements of specific occasions such as video noise reduction are met.
Detailed Description
As used in the specification and in the claims, certain terms are used to refer to particular components. As one skilled in the art will appreciate, manufacturers may refer to a component by different names. This specification and claims do not intend to distinguish between components that differ in name but not function. In the following description and in the claims, the terms "include" and "comprise" are used in an open-ended fashion, and thus should be interpreted to mean "include, but not limited to. "substantially" means within an acceptable error range, and a person skilled in the art can solve the technical problem within a certain error range to substantially achieve the technical effect. The following description is of the preferred embodiment for carrying out the invention, and is made for the purpose of illustrating the general principles of the invention and not for the purpose of limiting the scope of the invention. The scope of the present invention is defined by the appended claims.
In order to improve the image quality of the original image obtained by various image settings, a method and a system for rapidly realizing image noise reduction based on BIB3D are provided
The image processing method provided by the application comprises the following steps:
1 first stage cycle
1, reading a local small block of a noise image;
2, generating a plurality of big blocks containing small blocks;
3 cycle of each big block
(1) Performing a frequency domain transform (e.g., discrete transform, wavelet transform, etc.);
(2) when the transform coefficient is smaller than a specified threshold, implementing hard threshold noise reduction, and counting the number of nonzero elements;
(3) implementing corresponding inverse transformation to obtain a big block after noise reduction;
(4) taking out a corresponding small block in the big block;
4, solving an average value taking the reciprocal of the number of the nonzero elements as a weight value for the small blocks in all big blocks, and taking the average value as a final noise reduction result of the small blocks;
obtaining a temporary noise-reduced image;
2 second stage cycle
1, reading a local small block of a noise image;
2, generating a plurality of big blocks containing small blocks;
3 cycle of each big block
(1) Finding out the denoised big block at the same position of the big block in the denoised image
(2) The dense big block and big block pair implements frequency domain transformation (such as discrete transformation, wavelet transformation, etc.);
(3) solving the power spectrum of the denoised big block (namely the square of the real part of the frequency domain);
(4) calculating a wiener coefficient matrix, wherein the wiener coefficient factor is the power spectrum of the condensed big block/the power spectrum of the condensed big block + the interference factor delta
(3) Multiplying the frequency domain value of the big block of the original image by the wiener coefficient factor to obtain a new frequency domain value;
(4) carrying out inverse transformation on the new frequency domain of the big block of the original image to obtain the big block after noise reduction, and counting the number of nonzero elements;
(5) taking out a corresponding small block in the big block after noise reduction;
4, solving an average value taking the reciprocal of the number of the nonzero elements as a weight value for the small blocks in all big blocks, and taking the average value as a final noise reduction result of the small blocks;
obtaining a final noise-reduced image;
it should be noted that the above program is only a flow of the program, and those skilled in the art can implement the technical solution of the present invention by using various programming languages;
as will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
While the foregoing specification illustrates and describes several particular embodiments of the invention, it is to be understood that, as previously described, the invention is not limited to the precise embodiments disclosed herein
It is to be understood that the invention is not limited to the forms disclosed herein, but is not to be construed as excluding other embodiments, and that the invention is capable of use in various other combinations, modifications, and environments and is capable of changes within the scope of the inventive concept as expressed herein, commensurate with the skill or knowledge of the relevant art. Rather, changes and variations may be made by those skilled in the art without departing from the spirit and scope of the invention, which is to be limited only by the appended claims.