April 2020
Intermediate to advanced
438 pages
12h 2m
English
Execute the following steps to implement the CLS filter and to compare restored images with different frequency domain filters:
def cls_filter(y,h,c,lambd): Hf = fp.fft2(fp.ifftshift(h)) Cf = fp.fft2(fp.ifftshift(c)) Hf = np.conj(Hf) / (Hf*np.conj(Hf) + lambd*Cf*np.conj(Cf)) Yf = fp.fft2(y) I = Yf*Hf im = np.abs(fp.ifft2(I)) return (im, Hf)
x = rgb2gray(imread('images/building.png'))M, N = x.shapeh = np.ones((4,4))/16 ...Read now
Unlock full access