Given the code
function [nImg,mask] = myFunc(img,rl,rh)
[n m] = size(img);
mask = ones(n, m);
% do some stuff
% more
% and more
%
fourierImg = fft2(img); % take the fourier transform 2d for the given image
fourierImg = fftshift(fourierImg); % shift the fourier transform
output = mask.*fourierImg; % calc with the mask % THAT LINE CAUSES
% Warning: Displaying real part of complex input ?
ishifting = ifftshift(output); % grab the DC element
nImg = ifft2(ishifting); % inverse back to the image dimension
end
I keep getting : Warning: Displaying real part of complex input
when I execute
the line output = mask.*fourierImg; % calc with the mask
.
How can I fix that ?
Regards