How to do the filtered back projection?

조회 수: 69 (최근 30일)
mohd akmal masud
mohd akmal masud 2024년 5월 19일
댓글: Rik 2024년 5월 21일
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
mohd akmal masud
mohd akmal masud 2024년 5월 21일
I have not yet read the documentation for the pol2cart function.
Rik
Rik 2024년 5월 21일
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.

댓글을 달려면 로그인하십시오.

답변 (0개)

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by