What does the Mailat function implement function R SomeFunc

What does the Mailat function implement? function [R] = SomeFunction(img. theta. thetaStep) %Obtain the image size in the x-direction [x, y] = sizc(img); %Set a matrix R to hold the projection data R = zeros((theta/thetaStep) + 1.x); %Set vector for the angles to take projections at angles = 0;thetaStep;theta; %Matrix to hold all the rotated images separately to prevent blurring rotatedlmage = zerosix.y.length(angles)); %Loop to rotate image and add up values for the projections for i = l:(length(angles)) %rotate the image starting with theta = 0 degrees rotatedImage(:,:,i) = imrotat e(i mg.angi es(i).\'nearest\',\'crop\'); %Sum the columns of img to get projection data %Each row of R contains a projection at a certain theta R(i,:) = sum(rotatedlmage(;,;,i): end %Convcrt the matrix to a gray scale image in the range 0 to 255 R = mat2gray(R); Figure imshow(R) title(\'My SomcFunction\') end

Solution

The following observations made after going through the given code:

1) First the image size of the given function is obtained in the x-direction.

2) A matrix is created to hold the projection data from 00 to the given angle in the prescribed steps.

3) The image is rotated and sum the columns to get the projection data

4) Then the image is converted to grey scale and is shown in the figure with the title of \"My SomeFunction\"

 What does the Mailat function implement? function [R] = SomeFunction(img. theta. thetaStep) %Obtain the image size in the x-direction [x, y] = sizc(img); %Set

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site