how can i . Compare reconstructed original Image of Fourier Transform

2 views (last 30 days)
clc;
clear all;
close all;
imdata = imread('C:\Users\Th3_Bl4cK\Desktop\r.jpg');
figure(1);imshow(imdata); title('Original Image');
imdata = rgb2gray(imdata);
figure(2); imshow(imdata); title('Gray Image');
F = fft2(imdata);
S = abs(F);
figure(3);imshow(S,[]);title('Fourier transform of an image');
Fsh = fftshift(F);
figure(4);imshow(abs(Fsh),[]);title('Centered fourier transform of Image')
S2 = log(1+abs(Fsh));
figure(5);imshow(S2,[]);title('log transformed Image')
F = ifftshift(Fsh);
f = ifft2(F);
figure(6);imshow(f,[]),title('reconstructed Image')
In figure(7) I want to show the rgb image of original image .

Answers (1)

Image Analyst
Image Analyst on 16 Jun 2019
Try this:
imdata = imread('C:\Users\Th3_Bl4cK\Desktop\r.jpg');
figure(1);
imshow(imdata);
originalRGBImage = imdata; % Save original image for later display in figure (7)
title('Original Image');
imdata = rgb2gray(imdata); % imdata changed, so good thing we saved it.
% more code....
% Now display original image in figure 7
h7 = figure(7);
imshow(originalRGBImage);

Categories

Find more on Images in Help Center and File Exchange

Products


Release

R2014a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!