Skip to main content

Table 2 Pseudocode of the 2-D wavelet denoising algorithm

From: Prediction of protein structural classes by different feature expressions based on 2-D wavelet denoising and fusion

Input: 2-D data, d1 Output: new 2-D data, d2
1set x, n, t, j = 0; //set wavelet function, decomposition scale, threshold value and pointer j.
2(L [j], h1[j], h2[j], h3[j]) = wavedec2(x, d1) //decompose data.
3(h1[j], h2[j], h3[j]) = threshold(t, h1[j], h2[j], h3[j]); //quantize high frequency coefficients.
4for→j = 0 to n-1: //the process of decomposition.
5(L [j + 1], h1[j + 1], h2[j + 1], h3[j + 1]) = wavedec2(x, L [j]);
6(h1[j + 1], h2[j + 1], h3[j + 1]) = threshold(h, h1[j + 1], h2[j + 1], h3[j + 1]); j = j + 1;
7for→i = n-1 to 0: //the process of reconstruction.
8L [i-1] = waverec2(x, L [i], h1[i], h2[i], h3[i]); i = i-1;
9d2 = waverec2(x, L [i], h1[i], h2[i], h3[i]); //reconstruct data.