









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










9/8/08 Comp 665 – Fourier Filtering 1 The first Problem set is posted on the web site, and is due on 9/
More Frequency Components
Log(mag(X)) Log(mag(Y = X H))
Log(mag(X)) Log(mag(Y = X H))
9/9/08 Comp 665 – Fourier Fun 11 11
Log(mag(X)) Log(mag(Y = X H))
import Image im = Image.open(“mandrillSmall.png”) print im.size, im.format, im.mode im.show()
from pylab import * x = im.convert(“L”) # make image one channel X = fftshift(fft2(asarray(x))) H = fftshift(fft2(asarray(h))) mag = hypot(X.real, X.imag) t = 255.0 * mag / mag.max() Xim = Image.fromarray(numpy.uint8(t),'L') Xim.show() Xim.save(”imgMag.png", "PNG") mag = log10(mag) t = 255.0 * mag / mag.max() Xim = Image.fromarray(numpy.uint8(t),'L') Xim.show() Xim.save("imgLogMag.png", "PNG”)