Hi Mike
2008/7/3 Mike Sarahan <[EMAIL PROTECTED]>:
> I agree that the components are very small, and in a numeric sense, I
> wouldn't worry at all about them, but the image result is simply noise,
> albeit periodic-looking noise.
>
> Here's a code snippet:
> ----------------------------------------
> import numpy,Image
>
> img=Image.open('LlamaTeeth.jpg')
> arr=numpy.asarray(img)
> fftarr=numpy.fft.fftn(arr)
> ifftarr=numpy.fft.ifftn(fftarr)
> img2=Image.fromarray(ifftarr)
>
> img2.show()
> ----------------------------------------
There is a bug in PIL, so you must make sure that your array is of
type uint8 before you convert it to an Image, i.e.
ifftarr = ifftarr.astype(np.uint8)
imt2 = Image.fromarray(ifftarr)
Hope that works.
Cheers
Stéfan
_______________________________________________
Numpy-discussion mailing list
[email protected]
http://projects.scipy.org/mailman/listinfo/numpy-discussion