wiener_filter
- colibri.optics.functional.wiener_filter(image, psf, alpha)[source]
This function applies the Wiener filter to an image.
\[\begin{aligned} X(x, y) &= \mathcal{F}^{-1}\{Y(u, v) \frac{H^*(u, v)}{|H(u, v)|^2 + \alpha}\} \end{aligned}\]where \(H(u, v)\) is the optical transfer function, \(Y(u, v)\) is the Fourier transform of the image, \(\alpha\) is the regularization parameter, and \(X(x, y)\) is the filtered image.
- Parameters:
image (torch.Tensor) – Image to apply the Wiener filter (B, L, M, N)
psf (torch.Tensor) – Point Spread Function (1, L, M, N)
alpha (float) – Regularization parameter
- Returns:
Filtered image (B, L, M, N)
- Return type:
torch.Tensor