How to do the filtered back projection?
80 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Rik
am 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.
Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!