Skip to main content
. 2023 Jan 20;10(2):138. doi: 10.3390/bioengineering10020138
Algorithm 1: Proposed Model
1: Let a0 be an ideal image. Define the noisy image corrupted with Gaussian noise ‘a’, noise factor n, and standard deviation σ using
a=a0+n (1)
2: Evaluate the conditional probability distribution using
P(a0/a)=(2πσ2)1e((aa0)2/2σ2) (2)
3: Determine the observed noise version Pn given P0, the noiseless patch of a0 using
P(Pn/P0)=ce((PnP0)2/2σ2) where c=(2πσ2)1 (3)
4: Define the Euclidean norm of P0 as P0. Compute P(Pn/P0) using the Bayes rule.
P(Pn/P0)= P(Pn/P0)P(P0)/P(Pn) (4)
5: For a normalization constant α, the initial cluster Q0, iteration t, find the direct path, P(Q) to construct cluster Q of Gaussian samples.
P(Q)=αcP0e(Q0P0)t1(Q0P0)/2 (5)
6: Evaluate argP0maxP(Pn/P0).
argP0maxP(Pn/P0)=argP0max e(P0Pn)2cP0P0Pn)2/4α2 (6)
7: Find the posterior estimation Cpn.
CpnCp0+α2 (7)
8: Determine the maximum posterior estimation using
argP0maxP(Pn/P0)=argP0max e(P0Pn)2cP0P0Pn)t/α2 (8)
9: Evaluate Cpn.
Cpn=Pn+(Cp(n1)α2)cPn(PnP0) (9)
10: Update Cpn using
Cpn1P(p^n)1Q^P(p^n)(Q^ P^n¯) (Q^ P^n¯)tQ (10)
11: Estimate Cp0 using sampling estimates, neighbor patches Q^1.
Cp0=1P(p^1) Q^P(p^1)(Q^1P^1¯) (Q^1P^1¯)t (11)
P^1¯1P(p^1)Q^P(p^1)Q^1 (12)
12: Approximate Cpn using the covariance matrix of noisy patches
cpn=cp0+2I (13)
13: Apply the Bayes method.
P^2=P^1¯+cp^1[cp^1+2I]1(PnP¯n1) (14)
14: Perform grey level image—denoising process for different values of σ.
Type σ= 2 σ= 5 σ= 10 σ= 20 σ= 30 σ= 40 σ= 60 σ= 80 σ= 100
Classic 46.14 40.89 35.57 32.46 30.31 27.63 26.03 26.03 25.41
Iteration 46.19 40.12 36.62 33.60 29.67 27.51 26.24 26.24 25.72
Patch size:
e1={3,             σ205,   20<σ507,       otherwise e2={3,             σ505,   50<σ707,       otherwise (15)
15: Find a similar pattern retained:
N1=3e12 N2=3e22 (16)
16: Compute the size of the search area:
λ1= N1/2, λ2=N2/2 (17)
17: Set the threshold as
τ0=16e22 (18)
Cp11P(p^n)1Q^P(p^n)(Q^1P^n¯) (Q^1P^n¯)t (19)
18: Estimate P^2 using
P^1=P^n¯+cp^n[cp^n+σ2I]1(PnP¯n), (P^n)11P(p^1)Q^P(p^1)Q˜ (20)
CP^11P(p^1)1Q^P(p^1)(Q^1(P^n)1)(Q^1(P^n)1)t (21)
P^2=(P^n)1+cp^1[cp^1+σ2I]1(Pn(Pn)1) (22)
19: Evaluate the huge set of original patches using minimum mean square estimation
 P(PnP^n)=1(2πσ2)eP0Pn22σ2 (23)
P^0=E[PnP^n]=P(PnP^n)P0dP0=P(P0pn)P(pn)P(P0)P0dP0 (24)
P^01miP(PnP0)P0i1miP(PnPi) (25)
20: Evaluate E(P0Pn) using wavelet neighborhood de-noising.
P0=zU (26)
Pn=P0+N=zU+N (27)
E(P0Pn)=0P(zPn)E(P0Pn,z)dz (28)
 argminαP0 = P0Dα 2e2(cσ)2 (29)
21: Perform the restoration using
 P(Pi)=1(2π)e22|cei|12 e12(Piµ)Tcei(Piµ) (30)
22: Calculate Pi with index ki using
(Pi,ki)=arg maxpklog P(PiPni)  (31)
(Pi,ki)=arg maxpk(logP(PniPi,ck)+logP(Pick))  (32)