KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Currently I'm using PIL and NumPy. I have a colored png image and I want to: Read it in in grayscale Convert to NumPy array Perform a FFT on array Display the image This is what I'm trying (in IPython w/ --pylab flag): In [1]: import Image In [2]: img = Image.open('ping.png').convert('LA') In [3]: img_as_np = np.asarray(img) In [4]: img_as_np Out[4]: array(<Image.Image image mode=LA size=1000x1000 at 0x105802950>, dtype=object) In [5]: img_fft = fft.fft2(img_as_np) // IndexError: index out of range for array
Tags (comma-separated)
Save Edits
Cancel