Understanding FFT of an Image I am having trouble identifying the frequency components of an image,
Here I simply generated, 256x256 binary-image.
a = [zeros(256,128) ones(256,128)];
imshow(a);


Taking the image FFT and shifting the Zero-frequency to the center,
f = fft2(a)
shft = fftshift(f);
imshow(log(shft)) %stretching

will result,

How do I identify how many frequency components are there and what are those frequencies?
Also if I calculate FFT of any 1-D sequence and plot that sequence there are certain values on negative, what does that mean? How could there be negative frequencies?
My first suggestion is that you understand FFT in 1 dimension before trying to interpret results in 2D.

The Discrete Fourier Transform (FFT is an implementation of DFT) is a complex transform: it transforms between 2 vectors complex vectors of size N.

So in the 1D case, you will get not only negative values, but complex values in general.

The same applies in 2D. The imshow function is probably taking the real part of the complex matrix (it is not clear in the imshow documentation).