Prev: Output small Frequency Clock from a DAQ-Board !!!
Next: Output small Frequency Clock from a DAQ-Board !!!
From: Do on 29 Apr 2010 07:52 Hi. I am a beginner in image processing and matlab. Can anybody let me know the matlab code to get the fourier spectrum of an image? All I can do is up to here. im= imread('1.jpg'); f = rgb2gray(im); F = fft2(f); What is next? Thank a lot.
From: Luca Balbi on 5 May 2010 10:20 You're pretty much done. F is now your Fourier Transform, maybe you can try visualising the magnitude, if that is what you mean by spectrum: figure; pcolor(abs(F)); axis ij; even better, I would try a log scale: figure; pcolor(log(1+abs(F))); axis ij;
From: ImageAnalyst on 5 May 2010 11:24 You might want to look into fftshift() so that the origin is at the center of the spectrum image. It's more intuitive that way.
From: Eric Griffin on 10 May 2010 22:26 ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <01c671a5-0f5d-4787-a008-5cee0512f0d9(a)o14g2000yqb.googlegroups.com>... > You might want to look into fftshift() so that the origin is at the > center of the spectrum image. It's more intuitive that way. I am looking at doing the same thing. I have computed the fft and have shifted it... but when I find the spectrum, i just get a black screen. Any thoughts?
From: ImageAnalyst on 11 May 2010 08:00
On May 10, 10:26 pm, "Eric Griffin" <e.griffin.1...(a)gmail.com> wrote: > ImageAnalyst <imageanal...(a)mailinator.com> wrote in message <01c671a5-0f5d-4787-a008-5cee0512f...(a)o14g2000yqb.googlegroups.com>... > > You might want to look into fftshift() so that the origin is at the > > center of the spectrum image. It's more intuitive that way. > > I am looking at doing the same thing. I have computed the fft and have shifted it... but when I find the spectrum, i just get a black screen. Any thoughts? ------------------------------------------------------------ How are you displaying it? Did you try something like imshow(realArray, []); The [] is important when displaying floating point images. |