MATLAB: How to split Fourier transform of an image into two halves

crop

imcrop function is not working for the Fourier transformed image. Here is my code
i=imread('d.jpg');
ff=fft(i);
[rows,columns,noOfColorChannels]=size(ff);
tophalf=imcrop(ff,[1,1,columns,floor(rows/2)]);
This is showing the following error
??? Error using ==> imcrop>checkCData at 366
Invalid input image.
Error in ==> imcrop>parseInputs at 246
checkCData(a);
Error in ==> imcrop at 94
[x,y,a,cm,spatial_rect,h_image,placement_cancelled] = parseInputs(varargin{:});
the code is working fine for normal images.please make a correction so that it works

Best Answer

Why don't you directly take, top half as:
tophalf = ff(1:floor(rows/2),:,:) ;