Effacer les filtres
Effacer les filtres

How to do the filtered back projection?

26 vues (au cours des 30 derniers jours)
mohd akmal masud
mohd akmal masud le 19 Mai 2024
Commenté : Rik le 21 Mai 2024
Dear all,
I want to do the filtered back projection. Here is my code:
First, I created the phantom:
%create the phantom
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
imshow(Z); % show the "image"
Second, I transform to frequency domain:
j = fftshift(fft2(Z));
figure, imshow(j)
j1 = log(1+abs(j));
figure ,imshow(j1)
j2 = bar(j1);
Third, should be I multiply my frequency domain with my Ramp Filter. My Ramp filter as here:
% Define parameters
N = 512; % Number of points in the filter
fs = 1000; % Sampling freq. in Hz
f = fs * (-N/2:N/2-1)/N; % Freq. vector
% Creating the ramp filter in the freq. domain
rampFilter = abs(f);
% Plot
figure;
plot(f, rampFilter);
title('Ramp Filter');
xlabel('Frequency (Hz)');
ylabel('Amplitude');
grid on;
But, my problem is I dont know how to multiply my frequency domain with Ramp Filter, as the step number 2 in picture below.
ANYONE CAN HELP ME?
  7 commentaires
mohd akmal masud
mohd akmal masud le 21 Mai 2024
I have not yet read the documentation for the pol2cart function.
Rik
Rik le 21 Mai 2024
Did nobody in your previous 219 questions suggest reading the documentation? In my personal opinion that is (together with debugging tools) one of the main advantages of Matlab over alternatives like Python.

Connectez-vous pour commenter.

Réponses (0)

Produits


Version

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by