How to change the graph of frequency domain
Dear all,
I have coding to convert from spatial domain to frequency domain. Below is my coding.
Z = zeros(99); % create square matrix of zeroes
origin = [round((size(Z,2)-1)/2+1) round((size(Z,1)-1)/2+1)]; % "center" of the matrix
radius = round(sqrt(numel(Z)/(2*pi))); % radius for a circle that fills half the area of the matrix
[xx,yy] = meshgrid((1:size(Z,2))-origin(1),(1:size(Z,1))-origin(2)); % create x and y grid
Z(sqrt(xx.^2 + yy.^2) <= radius) = 1; % set points inside the radius equal to one
Z = im2double(Z)
imshow(Z); % show the "image"
%spatial domain
figure, imtool(Z)
%Frequency Domain
j = fftshift(fft2(Z));
figure, imshow(j)
j1 = log(1+abs(j));
figure ,imshow(j1)
j2 = bar(j1);
My graph frequency domain like this
How to make the graph like belowDear all,
I have coding to convert from spatial domain to frequency domain. Below is my coding.
Z = zeros(99); % create square matrix of zeroes
origin = [round((size(Z,2)-1)/2+1) round((size(Z,1)-1)/2+1)]; % "center" of the matrix
radius = round(sqrt(numel(Z)/(2*pi))); % radius for a circle that fills half the area of the matrix
[xx,yy] = meshgrid((1:size(Z,2))-origin(1),(1:size(Z,1))-origin(2)); % create x and y grid
Z(sqrt(xx.^2 + yy.^2) <= radius) = 1; % set points inside the radius equal to one
Z = im2double(Z)
imshow(Z); % show the "image"
%spatial domain
figure, imtool(Z)
%Frequency Domain
j = fftshift(fft2(Z));
figure, imshow(j)
j1 = log(1+abs(j));
figure ,imshow(j1)
j2 = bar(j1);
My graph frequency domain like this
How to make the graph like below Dear all,
I have coding to convert from spatial domain to frequency domain. Below is my coding.
Z = zeros(99); % create square matrix of zeroes
origin = [round((size(Z,2)-1)/2+1) round((size(Z,1)-1)/2+1)]; % "center" of the matrix
radius = round(sqrt(numel(Z)/(2*pi))); % radius for a circle that fills half the area of the matrix
[xx,yy] = meshgrid((1:size(Z,2))-origin(1),(1:size(Z,1))-origin(2)); % create x and y grid
Z(sqrt(xx.^2 + yy.^2) <= radius) = 1; % set points inside the radius equal to one
Z = im2double(Z)
imshow(Z); % show the "image"
%spatial domain
figure, imtool(Z)
%Frequency Domain
j = fftshift(fft2(Z));
figure, imshow(j)
j1 = log(1+abs(j));
figure ,imshow(j1)
j2 = bar(j1);
My graph frequency domain like this
How to make the graph like below image processing, image acquisition, image analysis, image segmentation, digital image processing MATLAB Answers — New Questions