Image denoising method, device and medium based on oblique haar class orthogonal transform
By using the oblique Haar-type orthogonal transform method to process images, the problems of high computational complexity and poor processing of high-frequency components in existing technologies are solved, thereby improving the image denoising effect and the flexibility of the algorithm.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA UNIV OF GEOSCIENCES (WUHAN)
- Filing Date
- 2023-11-09
- Publication Date
- 2026-07-21
AI Technical Summary
Existing orthogonal transform methods suffer from high computational complexity and inability to adapt to the frequency requirements of non-stationary signals during image denoising. Furthermore, the Haar, Walsh, and HTOM matrices are not effective in processing high-frequency components.
A slanted Haar-type orthogonal transform method is adopted. A slanted Haar-type orthogonal matrix is generated through slanted mutation operation to transform the noisy image. The transformation coefficients of the replaced part are set to 0, and compression and inverse transformation are performed. Various denoising forms are generated by combining different slanted mutation parameters to evaluate the image quality.
It achieves satisfactory image denoising results, possesses the flexibility and versatility of a fast algorithm, adapts to different image types and noise types, and improves denoising performance.
Smart Images

Figure CN117593206B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image data processing, and in particular to an image denoising method, device and medium based on oblique Haar orthogonal transform. Background Technology
[0002] Orthogonal transforms can convert time-domain signals into frequency-domain forms for analysis and utilization, and are widely used in signal processing, image processing, digital communication, information security, and privacy protection. Commonly used orthogonal transforms include the Fast Fourier Transform (FFT), Discrete Cosine Transform (DCT), Discrete Wavelet Transform (DWT), and Fast Walsh Transform (FWT). Among them, the Discrete Fourier Transform (DFT) can transform a finite-length signal into a superposition of sine waves with different frequencies. If the expanded function is real and even, its Fourier series expansion only contains cosine terms. That is, the Discrete Cosine Transform (DCT) is actually a special form of the DFT. To significantly reduce the computational complexity of the DFT, a fast algorithm in the form of the FFT has been developed. However, because the basis of the DFT, FFT, and DCT is global, their applications are limited. To overcome this deficiency, the Short-Time Fourier Transform (STFT) was proposed. However, the window width of the STFT is fixed and cannot be changed within an STFT, so the STFT still cannot meet the frequency requirements of non-stationary signals. By translation and scaling, short, attenuating wavelet bases replace infinitely long trigonometric function bases. The resulting wavelet transform, with its localization capabilities and multi-resolution characteristics, can successfully and effectively analyze and process signals. According to the pyramid decomposition of wavelet analysis, different wavelets correspond to different decomposition strategies. The Haar function is the simplest wavelet; the rows of the Haar orthogonal matrix represent Haar wavelets at different scales and times. Haar wavelets do not participate in further decomposition of the high-frequency components. The Walsh function corresponds to the Haar wavelet packet; the rows of the Walsh orthogonal matrix represent different Walsh functions. This means that different strategies can be used to fully and thoroughly decompose the low-frequency and high-frequency components of the signal to be analyzed. Between the Haar and Walsh orthogonal matrices lie Haar-class orthogonal matrices (HTOMs), such as Her and Ter matrices, and other orthogonal matrices between the former. These matrices partially decompose the high-frequency components, but square waves in Haar, Walsh, and HTOMs cannot smoothly process signals. Summary of the Invention
[0003] To address the aforementioned problems, this invention provides an image denoising method, device, and storage medium based on oblique Haar orthogonal transform. The image denoising method based on oblique Haar orthogonal transform mainly includes the following steps:
[0004] S1. Obtain a noisy image with a pixel matrix X of size m×n;
[0005] S2. Perform a slanted Haar orthogonal transformation on the pixel matrix X to obtain the transformed image coefficient matrix B. The specific steps are as follows:
[0006] S21. Recursively generate slant Haar-class orthogonal matrices SH through slant mutation operations. N ;
[0007] S22. Perform a slanted Haar-class orthogonal transformation on the pixel matrix X of the noisy image using a slanted Haar-class orthogonal matrix to obtain the transformation coefficient matrix B:
[0008]
[0009] in, For SH N The inverse matrix;
[0010] S3. Replace some elements of the transformed image coefficient matrix B with 0 to obtain the compressed image matrix B1;
[0011] S4. Restore the compressed image matrix B1 using a slant Haar-type orthogonal inverse transform to obtain the denoised image matrix Y;
[0012] S5. Change the oblique variation parameter to obtain different forms of oblique Haar orthogonal transformation. Repeat steps S2 to S4 to obtain denoised images and evaluate the quality of denoised images.
[0013] Furthermore, oblique Haar-class orthogonal matrices are recursively generated by combining Haar-class orthogonal matrices and oblique basis vectors. Moreover, by simply changing any one of the parameters s and r, different oblique Haar-class orthogonal matrices can be easily generated within the same program. s and r are integers satisfying s > 1 and 0 ≤ r. <s。
[0014] Furthermore, Haar-class orthogonal matrices include Haar matrices, Walsh matrices, Her matrices, Ter matrices, and other orthogonal matrices that are previously unreported and lie between Haar and Walsh matrices; among them, Haar matrices and Walsh matrices are transformed into slanted Haar matrices and slanted matrices respectively through slant mutation operations.
[0015] Furthermore, the recursive process of generating slant Haar-class orthogonal matrices using the slant mutation operation is as follows:
[0016]
[0017] K=2 s R = 2 s-r N = KR m , where m represents the order of the matrix. KR m-i Haar-type variation matrix of order sloping direction. KR m-i Haar class mutation matrix of order, For the Kroneck product, R represents i M-order identity matrix k This represents a K-order Walsh matrix.
[0018] here KR m-i A Haar-class mutation matrix of order 1 has the following decomposition form or fast algorithm.
[0019]
[0020] Indicates 2 s-j 1st order copy matrix Evenly inserted in KR m-i 2 -j identity matrix of order In this way,
[0021]
[0022]
[0023]
[0024]
[0025]
[0026] j = 0, 1, 2, ..., sr-2, sr-1, where diag{} is a diagonal matrix.
[0027] K-order Walsh matrix M K The fast algorithm is as follows:
[0028]
[0029] Here I K / 2 Represents the K / 2 identity matrix. F K This is a copy of the K-order Walsh matrix. It is a second-order Haar matrix.
[0030] Furthermore, step S3 specifically includes:
[0031] Sort the elements in the coefficient matrix of the transformed image from smallest to largest, replace the smaller element in the transformed coefficient matrix B that corresponds to the set percentage with 0, and keep the other coefficients unchanged to obtain the compressed image matrix B1.
[0032] Furthermore, the percentage is set to 90% during the parameter replacement process.
[0033] Furthermore, the image restoration process is as follows:
[0034]
[0035] Y is the denoised image similar to the original image, and B1 is the compressed image.
[0036] Furthermore, the image quality evaluation metric is the peak signal-to-noise ratio (PSNR), calculated using the following formula:
[0037]
[0038]
[0039] Where PNSR represents peak signal-to-noise ratio, D 2 Let m represent the variance, and m×n represent the image size.
[0040] A storage medium storing instructions and data for implementing an image denoising method based on oblique Haar orthogonal transform.
[0041] A computer device includes: a processor and a storage medium; the processor loads and executes instructions and data in the storage medium to implement an image denoising method based on oblique Haar orthogonal transform.
[0042] The beneficial effects of the technical solution provided by this invention are as follows: This invention obtains a noisy image with a pixel matrix size of m×n, performs a slant Haar-type orthogonal transformation on the pixel matrix to obtain a transformed image coefficient matrix, recursively generates a slant Haar-type orthogonal matrix through slant mutation operation, replaces some elements of the transformed image coefficient matrix with 0 to obtain a compressed image matrix, restores the compressed image matrix through an inverse slant Haar-type orthogonal transformation to obtain a denoised image matrix, changes the slant mutation parameter to obtain different forms of the slant Haar-type orthogonal transformation, repeats the steps to obtain a denoised image, evaluates the quality of the denoised image, and applies the slant Haar-type orthogonal transformation to the denoising of a standard image, achieving satisfactory results. In addition, by simply changing any one of the two parameters, different SHTs with fast algorithms can be conveniently and flexibly generated in the same program code, providing a variety of choices. Attached Figure Description
[0043] The present invention will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings:
[0044] Figure 1 This is a flowchart of an image denoising method based on oblique Haar orthogonal transform in an embodiment of the present invention;
[0045] Figure 2 This is a flowchart of the 8th-order SHT algorithm in an embodiment of the present invention;
[0046] Figure 3 This is a schematic diagram comparing different orthogonal transformation denoising processes for image (Ⅰ) in an embodiment of the present invention;
[0047] Figure 4 This is a schematic diagram comparing different orthogonal transformation denoising processes for image (II) in an embodiment of the present invention;
[0048] Figure 5 This is a schematic diagram comparing different orthogonal transformation denoising processes for image (Ⅲ) in an embodiment of the present invention;
[0049] Figure 6 This is a schematic diagram comparing different orthogonal transformation denoising processes for image (Ⅳ) in an embodiment of the present invention;
[0050] Figure 7 This is a schematic diagram comparing different orthogonal transformation denoising processes for image (V) in an embodiment of the present invention;
[0051] Figure 8 This is a schematic diagram of the hardware device working in an embodiment of the present invention. Detailed Implementation
[0052] To provide a clearer understanding of the technical features, objectives, and effects of the present invention, specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0053] The embodiments of the present invention provide an image denoising method, device and storage medium based on oblique Haar orthogonal transform.
[0054] Before detailing the specific solution, the relevant knowledge of orthogonal transformations involved in this invention will be explained.
[0055] Wavelet pyramid decomposition strategy
[0056] The Haar function is the simplest wavelet. The rows of a Haar orthogonal matrix represent Haar wavelets at different scales and times. Haar wavelets do not participate in further decomposition of the high-frequency components. The Walsh function corresponds to the Haar wavelet packet. The rows of a Walsh orthogonal matrix represent different Walsh functions, meaning that different strategies can be used to fully decompose the low-frequency and high-frequency components of the signal to be analyzed. Between the Haar and Walsh orthogonal matrices lie Haar-like orthogonal matrices (HTOMs), such as Her matrices and Ter matrices. These matrices perform partial decomposition of the high-frequency components.
[0057] Recursive generation of SHTOT and its fast algorithm
[0058] For matrix A = (α ij ),B=(b ij We have a matrix
[0059]
[0060] The K×K Walsh mutation matrix, Walsh replication matrix, and skew mutation matrix are represented as follows:
[0061]
[0062]
[0063]
[0064] I K / 4-1 , I K / 4 , I K / 2 Let these represent (K / 4-1)×(K / 4-1), K / 4×K / 4, and (K / 2)×(K / 2) identity matrices, respectively. In particular, let a be the skewness variation parameter. K ,b K The calculation is as follows:
[0065]
[0066] K = 4, 8, ..., N / 2, N, where N = 2 n n is a natural number.
[0067] Taking the 8th-order Slant-Haar transform (SHTOT) as an example, the fast SHT algorithm flow is as follows: Figure 2 As shown.
[0068] Please refer to Figure 1 , Figure 1It is a flowchart of an image denoising method based on the skew Haar - type orthogonal transform in an embodiment of the present invention, which specifically includes the following steps:
[0069] In the first step, obtain a noisy image with a pixel matrix X of size m×n. In this embodiment, the standard image "Lena" of size 256×256 is used, and "salt&pepper" type noise is added to it.
[0070] In the second step, perform a skew Haar - type orthogonal transform on the pixel matrix X to obtain a transformed image coefficient matrix B.
[0071] Among them, the skew Haar - type orthogonal matrix is recursively generated by combining the Haar - type orthogonal matrix and the skew basis vector. And by simply changing any one of the parameters s and r, different skew Haar - type orthogonal matrices can be conveniently generated in the same program. Both s and r are integers and satisfy s>1, 0≤r<s. The Haar - type orthogonal matrix includes the Her matrix, the Ter matrix, the Haar matrix, the Walsh matrix, and other orthogonal matrices that have never been reported before and are between the Haar matrix and the Walsh matrix.
[0072] Step 1: Recursively generate the skew Haar - type orthogonal matrix through skew mutation operation;
[0073] Step 2: Use the skew Haar - type orthogonal matrix to perform a skew Haar - type orthogonal transform on the noisy image to obtain the transformed coefficient matrix B:
[0074]
[0075] Among them, is the inverse matrix of SH N of.
[0076] In addition, the recursive process of the skew Haar - type orthogonal matrix is as follows:
[0077]
[0078] K = 2 s , R = 2 s-r , N = KR m , all represent the order of the matrix, and m is a natural number; is the kroneck product, represents the skew Haar - type mutation matrix of order KR m-i , represents the Haar - type mutation matrix of order KR m-i , represents the identity matrix of order R, M i k represents the Walsh matrix of order K.
[0079] KR m-i A Haar-class mutation matrix of order 1 has the following decomposition form or fast algorithm.
[0080]
[0081] Indicates 2 s-j 1st order copy matrix Evenly inserted in KR m-i 2 -j identity matrix of order In this way,
[0082]
[0083]
[0084]
[0085]
[0086]
[0087] j = 0, 1, 2, ..., sr-2, sr-1, where diag{} is a diagonal matrix.
[0088] M K To represent a K-order Walsh matrix, a fast algorithm is as follows:
[0089]
[0090] Here I K / 2 Represents the K / 2 identity matrix. F K This is a copy of the K-order Walsh matrix. It is a second-order Haar matrix.
[0091] The third step is to process the transformed image coefficient matrix to obtain the compressed image matrix.
[0092] Sort the coefficients in the coefficient matrix of the transformed image from smallest to largest, and set 90% of the coefficients to 0 according to the logic of removing the smallest ones, while keeping the other coefficients unchanged, to obtain the compressed image matrix.
[0093] The fourth step is to restore the compressed image matrix to obtain the denoised image matrix:
[0094]
[0095] Y is the denoised image similar to the original image, and B1 is the compressed image.
[0096] Fifth, change the oblique variation parameter to obtain different forms of oblique Haar-type orthogonal transformation, repeat steps two to four to obtain denoised images, and evaluate the quality of denoised images.
[0097] The peak signal-to-noise ratio (PSNR) is used to evaluate image quality, and its calculation formula is as follows:
[0098]
[0099]
[0100] Where PNSR represents peak signal-to-noise ratio, D 2 Let m represent the variance, and m×n represent the image size.
[0101] This embodiment changes the specific form of the orthogonal transformation under the same conditions. The specific parameters are shown in Table 1. The denoised image is obtained by following the above steps, and the image quality is compared and analyzed.
[0102] To verify the general applicability of the method, this embodiment selects different images, changes the noise type, compares the denoised images after different orthogonal transformations, and evaluates the image quality. The original image + noise combination is adopted with (II) Peppers+gaussian, (III) Baboon+salt&pepper, (IV) Bridge+gaussian, and (V) trees+speckle. Salt&pepper, gaussian, and speckle represent "salt and pepper", "gaussian", and "speckle" noise types, respectively. The denoised images obtained in different types of orthogonal transformations are compared. Each group of images is denoised at a compression ratio of 90% and 98%, respectively.
[0103] Table 1 shows that, except for DWT (Slantlet), SHTOT generally outperforms DCT, DWT, HTOT, Haar, Walsh, and Slant (skew) transforms in most cases. In particular, SHTOT with parameters (s=1, r=0), (s=2, r=0), or (s=2, r=1) shows even more significant denoising results. Furthermore, the denoising effect is also related to the image type, such as... Figure 6 , Figure 7 The images shown (IV (Bridge) and V (trees) demonstrate that DCT exhibits superior denoising performance at a high compression ratio (98%).
[0104]
[0105] Table 1. Image denoising quality of different images under different transformations.
[0106] Please see Figure 8 , Figure 8This is a schematic diagram of the hardware device operation according to an embodiment of the present invention. The hardware device specifically includes: a computer device 401, a processor 402, and a storage medium 403.
[0107] A computer device 401: The computer device 401 implements the image denoising method based on oblique Haar orthogonal transform.
[0108] Processor 402: The processor 402 loads and executes the instructions and data in the storage medium 403 to implement the image denoising method based on oblique Haar orthogonal transform.
[0109] Storage medium 403: The storage medium 403 stores instructions and data; the storage medium 403 is used to implement the image denoising method based on oblique Haar orthogonal transform.
[0110] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
[0111] The beneficial effects of this invention are as follows: This invention obtains a noisy image with a pixel matrix size of m×n, performs a slant Haar-type orthogonal transformation on the pixel matrix to obtain a transformed image coefficient matrix, replaces some elements of the transformed image coefficient matrix with 0 to obtain a compressed image matrix, restores the compressed image matrix through a slant Haar-type inverse orthogonal transformation to obtain a denoised image matrix, changes the slant variation parameter to obtain different forms of the slant Haar-type orthogonal transformation, repeats the steps to obtain a denoised image, evaluates the quality of the denoised image, and applies the slant Haar-type orthogonal transformation to denoise a standard image, achieving satisfactory results. Furthermore, by simply changing any one of the two parameters, different SHTs with fast algorithms can be conveniently and flexibly generated in the same program code, providing a variety of choices.
[0112] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. An image denoising method based on oblique Haar-type orthogonal transform, characterized in that, The specific steps include: S1. Obtain the pixel matrix X Size is m×n Noisy images; S2, pixel matrix X Perform a slanted Haar orthogonal transform to obtain the transformed image coefficient matrix. B The specific steps are as follows: S21. Recursively generate skewed Haar-class orthogonal matrices through skew mutation operations. The oblique Haar-class orthogonal matrix is recursively generated by combining Haar-class orthogonal matrices and oblique basis vectors. Furthermore, different oblique Haar-class orthogonal matrices can be generated within the same program by changing only one of the oblique variation parameters s and r, where s and r are integers and satisfy... s ; S22. Perform a slant Haar-type orthogonal transformation on the pixel matrix X of the noisy image using a slant Haar-type orthogonal matrix to obtain the transformation coefficient matrix. B : in, for The inverse matrix; The recursive process of generating skewed Haar-class orthogonal matrices using the skew mutation operation is as follows: = = , , , where represents the order of the matrix. m It is a natural number; express KR m-i Haar-type variation matrix of order sloping direction. express KR m-i Haar class mutation matrix of order, For the Kroneck product, express R i An identity matrix of order 1. M k express K Walsh matrix of order 1; express KR m-i A Haar-class mutation matrix of order 1 has the following decomposition form or fast algorithm; = , m=1, ,i=0,1, , m-1; express 1st order copy matrix Evenly inserted identity matrix of order middle, A = diag , B = diag , , C = diag , D = diag , , , diag{} It is a diagonal matrix; express K For an order Walsh matrix, a fast algorithm is available as follows: here express K / 2 identity matrix of order 1 , , F K for K A copy matrix of an order Walsh matrix. It is a second-order Haar matrix; S3, Transform the image coefficient matrix B Some elements are replaced with 0 to obtain a compressed image matrix. B 1; S4. Compress the image matrix B 1. The denoised image matrix is obtained by restoring the image using oblique Haar-type orthogonal inverse transform. Y ; S5. Change the oblique variation parameter to obtain different forms of oblique Haar orthogonal transformation. Repeat steps S2 to S4 to obtain denoised images and evaluate the quality of denoised images.
2. The image denoising method based on oblique Haar orthogonal transform as described in claim 1, characterized in that, The Haar-class orthogonal matrices include Haar matrices, Walsh matrices, Her matrices, Ter matrices, and other orthogonal matrices that have not been previously reported and lie between Haar and Walsh matrices.
3. The image denoising method based on oblique Haar orthogonal transform as described in claim 1, characterized in that, Step S3 is as follows: Sort the elements in the coefficient matrix of the transformed image from smallest to largest, replace the smaller element in the transformed coefficient matrix B that corresponds to the set percentage with 0, and keep the other coefficients unchanged to obtain the compressed image matrix B1.
4. The image denoising method based on oblique Haar orthogonal transform as described in claim 3, characterized in that, The percentage is set to 90% during the parameter replacement process.
5. The image denoising method based on oblique Haar orthogonal transform as described in claim 3, characterized in that, Compressed image matrix B 1. The process of restoring the original structure using the oblique Haar-type orthogonal inverse transform is as follows: Y= Y To compare the denoised image with the original image, B 1 is a compressed image.
6. The image denoising method based on oblique Haar orthogonal transform as described in claim 1, characterized in that, The peak signal-to-noise ratio (PSNR) is used to evaluate image quality, and its calculation formula is as follows: PSNR=10log = PSNR represents peak signal-to-noise ratio. D 2 Represents variance. m×n Indicates the image size.
7. A storage medium, characterized in that: The storage medium stores instructions and data for implementing the image denoising method based on oblique Haar orthogonal transform as described in any one of claims 1 to 6.
8. A computer device, characterized in that: include: A processor and a storage medium; the processor loads and executes instructions and data in the storage medium to implement the image denoising method based on oblique Haar orthogonal transform as described in any one of claims 1 to 6.