I need help in how to write mathlab codes for information in this pictures... As
ID: 3704883 • Letter: I
Question
I need help in how to write mathlab codes for information in this pictures... Assignment#2 Write a function in matlab that takes two parameters: 1) an image 2) an angle (only three values are possible here, 90, 180 or 270) Your function should rotate the image by 90 degrees, 180 degrees, or 270 degrees depending on the angle provided in the second argument. You should use "Transpose" function in addition to whatever you think is necessary to do this job. Submit your work (matlab code) in the blackboard.Explanation / Answer
function B = image_rotate(image,angle)
A = imread(image);
if angle = 90:
B = A.'
B = flipud(B)
elseif angle = 180:
B = flipud(A)
B = B.'
elseif angle = 270:
B = A.'
B = fliplr(B)
end
###### image Rotation – 180 degrees
Rotation – 90 degrees
Rotation – 270 degrees
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.