How these similar pixels can be founded?
For a pixel \(p = (x,y)\) of the image \(\bold{I}\), we compute the value of pixel \(p\) as follows:
$$\bold{I}[p] = \frac{1}{C(p)} \sum_{q \in B(p,r)} \bold{I}[p] \cdot w(p,q), \qquad C(p) = \sum_{q \in B(p,r)} w(p,q),$$
where \(B(p,r)\) is a search window centered at \(p\) with size \((2r+1)\times(2r+1)\) pixels. The value of search size, \(r\), is determined by the standard deviation of noise \(\sigma\).
The weight \(w(p,q)\) is computed by using an exponential kernel
$$w(p,q) = e^{-\frac{\max(d^2(p,q)-2\sigma^2,0)}{h^2}},$$
where \(d^2(p,q)\) is the squared Euclidean distance between two patches of size \((2f+1) \times (2f+1)\) centered at \(p\) and \(q\)
$$d^2(p,q) = \frac{1}{(2f+1)^2} \sum_{j \in B(0,f)} (\bold{I}[p+j]-\bold{I}[q+j])^2$$
and \(h\) is the filtering parameter defined as
$$h = k \sigma.$$
The value of \(k\) decreases as the search size, \(r\), increases.
For a patch \(B=B(p,f)\) centered at \(p=(x,y)\) with size \((2f+1) \times (2f+1)\) of the image \(\bold{I}\), we compute the value of pixel \(p\) as follows:
$$\bold{I}[p]=\frac{1}{(2f+1)^2} \sum_{Q(q,f) | q \in B(p,f)} \hat{Q}[p],$$
$$\hat{Q} = \frac{1}{C} \sum_{Q(q,f) \in B(p,r)} Q \cdot w(B,Q), \qquad C = \sum_{Q(q,f) \in B(p,r)} w(B,Q),$$
where \(B(p,r)\) is a search window centered at \(p\) with size \((2r+1)\times(2r+1)\) pixels. The value of search size, \(r\), is determined by the standard deviation of noise \(\sigma\).
The weight \(w(p,q)\) is computed by using an exponential kernel
$$w(p,q) = e^{-\frac{\max(d^2-2\sigma^2,0)}{h^2}},$$
where \(d^2\) is defined to be the squared Euclidean distance
$$d^2(p,q) = \frac{1}{(2f+1)^2} \sum_{j \in B(0,f)} (\bold{I}[p+j]-\bold{I}[q+j])^2$$
and \(h\) is the filtering parameter defined as
$$h = k \sigma.$$
The value of \(k\) decreases as the search size, \(r\), increases.