How to provide pseudo (false) color to inverse fast fourier transformed image (IFFT)
6 views (last 30 days)
Hello, and thanks in advance.
I have post-processed an image (code is given below)
image=imread('my_image.jpg'); % read out the image file (RGB image)
subcrop=rgb2gray(imcrop(image,[415 59 526 687])); % crop the region of interest
T=fft2(subcrop); % fast fourier transformation of cropped image
FFT=T; % store into another variable named FFT
FFTS=fftshift(FFT); % shift the frequency of image to the center of FFT frequency domain
imshow(FFT2) % diaplay the centre shifted frequency
[r,c]=size(subcrop); % creating a matrix of same size of image
TS=circshift(FFTS,77); % shift the pole by a value of 77 (1st order frequency) to the center (zeroth order frequency) , this step is requirement of the objective
gauss=fspecial('gaussian',[r,c],19); % creating a gaussina filter of size r,c
SP=TS.*gaussian; % multiplying TS with a gaussian filter
output_image=(ifft2(SP)); % inverse FFT of SP
imshow(output_image) % display the final output
Now I wanted to provide fasle or Pseudo color to 'output_image" based on intesnity gradient but I am unable to add this.
I have tried using rgb2ind as well as real(), imag() but these are not working.
Please help me in order to solve this problem, your help will be highly appriciated.
raw image (rgb) and post-processed images are attached