Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Run a Matlab script below, and it was stuck at line 6 . . . % Read in the image original _ image = imread

Run a Matlab script below, and it was stuck at line 6...
% Read in the image
original_image = imread('street.jpg');
% Compute the Radon transform
theta =0:1:179;
[R, xp]= radon(original_image, theta);
% Initialize variables to store results
mse_results = zeros(4,1);
reconstructed_images = cell(4,1);
% Perform inverse Radon transform with different filters and interpolations
filters ={'Ram-Lak', 'Hamming', 'Cosine', 'Cosine'};
interpolations ={'linear', 'linear', 'spline', 'nearest'};
for i =1:4
reconstructed_images{i}= iradon(R, theta, 'linear', filters{i}, interpolations{i});
% Calculate the MSE
mse_results(i)= sum(sum((double(original_image)- reconstructed_images{i}).^2))/ numel(original_image);
end
% Display the results
figure;
subplot(2,3,1);
imshow(original_image);
title('Original Image');
subplot(2,3,2);
imagesc(theta, xp, R);
colormap(gca, 'hot');
title('Radon Transform');
for i =1:4
subplot(2,3, i +2);
imshow(reconstructed_images{i},[]);
title(['Reconstructed Image -', filters{i},'/', interpolations{i},'- MSE: ', num2str(mse_results(i))]);
Error below:
end problem8
Error using radon
Expected input number 1, I, to be two-dimensional.
Error in radon (line 65)
validateattributes (I,{'numeric', 'logical'},{'2d', 'nonsparse'},mfilename, 'I',1) ;
Error in problem8(1ine 6)
[R,xp]= radon(original_image, theta);
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions