NAME

wiener -- wiener filter

PROTOTYPE

unitptr wiener( int iFFTx, int iFFTy, float fPhi, unitptr uHost)

ARGUMENTS

int iFFTx
Width of FFT data
int iFFTy
Height of FFT data
float fPhi
Filter constant Phi
unitptr uHost
Host unit

RETURN VALUE:

A pointer to the created unit or NULL in the case of an error.

INTERFACE OF CREATED UNIT:

X_in[2*iFFTx*iFFTy]:
(packed input field 0) complex FFT data
Y_in[4]:
(input field 1) blur paramters
X_out[2*iFFTx*iFFTy]:
(packed output field 0) filtered FFT data

DESCRIPTION:

This unit implements a simple wiener filter in order to restore images degenerated by motion and out-of-focus blur, respectively. The FFT of the blurred image is assumed to be present at input field X_in. The blur parameters extracted from the degenerated image by the blur_extract unit are assumed to be present at Y_in. The wiener filter is defined by: Q(u,v) = H*(u,v) / (abs(H(u,v))^2 + (Pn(u,v)/Pf(u,v))), where H* is the complex conjugate of the Optical Transfer Function H, Pn and Pf are the power spectra of noise and signal of the uncorrupted original image data. Since the original data is unkown, the quotient Pn(u,v)/Pf(u,v) is approximated by the filter constant Phi.

STATUS:

preliminary

SEE ALSO:

blur_extract

FILE

nst_fft2d.cc