python - FFT in SimpleCV? -


I'm searching SimpleCV in Python as an imaging library, and it looks great. However, I have been stumped about how to do FFT on an image in direct CCV. It seems that I have to convert a first spiked array, and then use numpy features:

  Import SV as SimpleCV IM = image ( 'image.png') img = +1 im.getGrayNumpy () Imf = np.fft.fftshift (np.fft.fft2 (img)) plt.imshow (log (abs (IMF)), Semeep = Semikgret)   

Or maybe this is the best way? And of course if I want to log a free spectrum for later use in a simple CV image, then this is another issue ...

you numpy matrix SimpleCV to image () constructor:

 Using it.  import scipy import numpy as np import simplecv as scv cam = scv.Camera () disp = scv.Display () while disp.isNotDone (): Current = cam.getImage (). Resize (w = 768) matrix = Current.getGrayNumpy () spectrum = np.abs (np.log (np.fft.fftshift (np.fft.fft2 (matrix))) spectrum * = 255 / Spektrmkmaks () scv Show Image (). If disp.mouseLeft: Break    

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -